54 lines
1.3 KiB
Python
54 lines
1.3 KiB
Python
"""
|
|
Foxhunt RunPod Workflow Module
|
|
|
|
Production-ready Python module for deploying and monitoring ML training on RunPod GPU infrastructure.
|
|
|
|
Features:
|
|
- Pod deployment via REST API with datacenter filtering
|
|
- S3-based log monitoring (NO SSH required)
|
|
- Automatic pod termination on training completion
|
|
- Progress tracking with rich output
|
|
- Retry logic with exponential backoff
|
|
- Comprehensive error handling
|
|
|
|
Usage:
|
|
from foxhunt_runpod import RunPodClient, PodMonitor, S3Client
|
|
|
|
# Deploy pod
|
|
client = RunPodClient()
|
|
pod = client.deploy_pod(gpu_type="RTX A4000", command="--epochs 50")
|
|
|
|
# Monitor training
|
|
monitor = PodMonitor(pod['id'])
|
|
monitor.wait_until_running(timeout=300)
|
|
monitor.stream_s3_logs(follow=True)
|
|
|
|
# Auto-terminate on completion
|
|
monitor.auto_terminate()
|
|
"""
|
|
|
|
from .client import RunPodClient
|
|
from .monitor import PodMonitor
|
|
from .s3_client import S3Client
|
|
from .config import RunPodConfig
|
|
from .errors import (
|
|
RunPodError,
|
|
PodDeploymentError,
|
|
PodNotFoundError,
|
|
S3Error,
|
|
ConfigurationError,
|
|
)
|
|
|
|
__version__ = "1.0.0"
|
|
__all__ = [
|
|
"RunPodClient",
|
|
"PodMonitor",
|
|
"S3Client",
|
|
"RunPodConfig",
|
|
"RunPodError",
|
|
"PodDeploymentError",
|
|
"PodNotFoundError",
|
|
"S3Error",
|
|
"ConfigurationError",
|
|
]
|