1.8 KiB
1.8 KiB
Foxhunt RunPod Module - Quick Start
Installation (Required)
cd /home/jgrusewski/Work/foxhunt/ml/python/foxhunt_runpod
pip install -r requirements.txt
Verify Installation
python /home/jgrusewski/Work/foxhunt/ml/python/test_module_import.py
Expected output:
Testing foxhunt_runpod module imports...
1. Importing main module...
✓ Version: 1.0.0
...
✅ All imports successful!
Deploy Pod (Example)
from foxhunt_runpod import RunPodClient, PodMonitor
# 1. Deploy pod (auto-selects cheapest GPU ≥16GB VRAM)
client = RunPodClient()
pod = client.deploy_pod(
gpu_type="RTX A4000", # Optional: preferred GPU
command="--parquet-file /runpod-volume/test_data/ES_FUT_180d.parquet --epochs 50"
)
# 2. Monitor training (S3 log tailing)
monitor = PodMonitor(pod['id'])
monitor.wait_until_running(timeout=300) # Wait for pod to start
monitor.stream_s3_logs(follow=True) # Stream logs until completion
# 3. Auto-terminate on completion
monitor.auto_terminate()
Run Examples
python /home/jgrusewski/Work/foxhunt/ml/python/foxhunt_runpod/example_usage.py
Select from 5 examples:
- Deploy and Monitor Training
- List Available GPUs
- List All Pods
- S3 Operations
- Monitor Existing Pod
Configuration
Configuration is loaded from /home/jgrusewski/Work/foxhunt/.env.runpod (already configured).
Documentation
- Complete Guide:
README.md - Implementation Details:
/home/jgrusewski/Work/foxhunt/RUNPOD_PYTHON_MODULE_IMPLEMENTATION.md - Examples:
example_usage.py
Key Features
- ✅ S3 log monitoring (NO SSH required)
- ✅ Automatic GPU selection by price
- ✅ Retry logic with exponential backoff
- ✅ Auto-termination on training completion
- ✅ Rich terminal output
- ✅ Type-safe with pydantic