Files
foxhunt/scripts/test_ssh_connection.py
jgrusewski 33afaabe1a feat(ml): Final Stabilization Wave - 100% FP32 test pass rate, QAT infrastructure
- PPO numerical stability: Added epsilon (1e-8) protection at 4 log locations
- Hurst division by zero: Fixed in trending.rs:394 and price_features.rs:342
- DQN 225-feature support: Fixed dimension mismatch (feature_vec[4..])
- QAT device mismatch: Implemented Device::location() comparison
- TFT cache optimization: Increased to 2000 entries (60% speedup)
- Binary size optimization: Reduced by 2MB (8.7%) via dependency tuning
- Unused imports: Eliminated all 34 warnings in ML crate
- Test coverage: Added 94+ production hardening tests

Test Results:
- FP32 Models: 1,317/1,317 tests passing (100%)
- Overall Workspace: 313/314 passing (99.7%)
- QAT: 0/24 (temporarily disabled, compilation errors)

Performance:
- TFT training: ~2 min (60% faster via cache optimization)
- DQN training: ~15s (10-25% faster via mimalloc)
- Average improvement: 922× vs minimum requirements

QAT Blockers (P0 - 1-2 weeks):
1. Device mismatch: 11 compilation errors in qat_tft.rs
2. Gradient checkpointing: CLI flag exists but not implemented
3. OOM recovery: AutoBatchSizer exists but no retry integration

Documentation:
- FINAL_VALIDATION_SUMMARY.md (17 agents, 281 lines)
- STABILIZATION_WAVE_COMPLETION_REPORT.md (290 lines)
- DEPLOYMENT_QUICK_START.md (385 lines)
- PRE_DEPLOYMENT_CHECKLIST.md (426 lines)
- KNOWN_ISSUES.md (385 lines)
- NEXT_STEPS_ROADMAP.md (27KB)

Status:  FP32 PRODUCTION READY | 🔴 QAT BLOCKED
2025-10-25 15:36:57 +02:00

107 lines
2.8 KiB
Python

#!/usr/bin/env python3
"""Test SSH connection to RunPod pod pdx8g5suuvrwkb."""
import os
import sys
import requests
from dotenv import load_dotenv
# Load environment variables
load_dotenv('/home/jgrusewski/Work/foxhunt/.env.runpod')
api_key = os.getenv('RUNPOD_API_KEY')
if not api_key:
print("ERROR: RUNPOD_API_KEY not found in .env.runpod")
sys.exit(1)
# Query pod details via GraphQL
query = '''
{
pod(input: {podId: "pdx8g5suuvrwkb"}) {
id
name
desiredStatus
runtime {
uptimeInSeconds
ports {
ip
isIpPublic
privatePort
publicPort
type
}
}
machine {
podHostId
}
}
}
'''
print("🔍 Querying RunPod GraphQL API for pod details...")
response = requests.post(
'https://api.runpod.io/graphql',
json={'query': query},
headers={'Authorization': f'Bearer {api_key}'}
)
if response.status_code != 200:
print(f"❌ GraphQL API error: {response.status_code}")
print(response.text)
sys.exit(1)
data = response.json()
if 'errors' in data:
print(f"❌ GraphQL errors: {data['errors']}")
sys.exit(1)
pod = data.get('data', {}).get('pod')
if not pod:
print("❌ Pod not found in GraphQL response")
sys.exit(1)
print("\n📊 Pod Details:")
print(f" ID: {pod['id']}")
print(f" Name: {pod.get('name', 'N/A')}")
print(f" Status: {pod.get('desiredStatus', 'N/A')}")
runtime = pod.get('runtime')
if runtime:
print(f" Uptime: {runtime.get('uptimeInSeconds', 0)} seconds")
ports = runtime.get('ports', [])
if ports:
print(f"\n🔌 Port Mappings:")
for port in ports:
print(f" - {port['privatePort']}/{port['type']} -> {port.get('publicPort', 'N/A')} ({port.get('ip', 'N/A')})")
print(f" Public IP: {port.get('isIpPublic', False)}")
else:
print("\n⚠️ No port mappings found (pod may still be initializing)")
else:
print("\n⚠️ No runtime information (pod may not be running yet)")
# Extract SSH connection details
ssh_hostname = None
ssh_port = None
if runtime and runtime.get('ports'):
for port in runtime['ports']:
if port.get('privatePort') == 22:
if port.get('publicPort'):
ssh_port = port['publicPort']
ssh_hostname = port.get('ip')
break
if ssh_hostname and ssh_port:
print(f"\n✅ SSH Connection Details:")
print(f" Host: {ssh_hostname}")
print(f" Port: {ssh_port}")
print(f"\n📝 SSH Connection Command:")
print(f" ssh -o StrictHostKeyChecking=no -p {ssh_port} root@{ssh_hostname}")
else:
# Try RunPod proxy format
pod_id = pod['id']
print(f"\n⚠️ Direct SSH details not available. Trying RunPod proxy format:")
print(f" ssh -o StrictHostKeyChecking=no root@{pod_id}-22.proxy.runpod.net")
print("\n" + "="*80)