RunHandle¶
Returned by submit_training_run(), submit_training_sweep(), and submit_run(). Provides methods for monitoring and downloading results.
Properties¶
| Property | Type | Description |
|---|---|---|
id |
int |
Numeric run ID |
slug |
str |
URL-safe identifier (run_ + 8 chars) |
name |
str |
Human-readable name |
status |
str |
queued, running, completed, or failed |
dashboard_url |
str |
Dashboard URL for this run |
tensorboard_url |
str |
TensorBoard URL |
progress |
float |
Completion fraction (0.0 to 1.0) |
refresh¶
Refresh run state from the server. Returns self for chaining.
wait_for_completion¶
run.wait_for_completion(
timeout: float | None = None,
poll_interval: float = 5.0,
show_progress: bool = True,
) -> RunHandle
Block until the run completes or fails.
| Parameter | Default | Description |
|---|---|---|
timeout |
None |
Max seconds to wait. None = wait forever |
poll_interval |
5.0 |
Seconds between status checks |
show_progress |
True |
Show a Rich progress bar in the terminal |
Raises: TimeoutError if timeout exceeded.
get_metrics¶
Get aggregated metrics for this run.
get_tasks¶
Get all tasks for this run.
download_results¶
Download all completed task results to a local directory.
Raises: ResultsNotReadyError if the run hasn't completed.
list_artifacts¶
List artifacts. Optionally filter by type.
list_checkpoints¶
List checkpoint artifacts.
list_videos¶
List video artifacts.
download_artifact¶
Download a specific artifact by S3 key.
download_checkpoint¶
Download a checkpoint by filename (e.g., "model_5000.pt").
Raises: RunNotFoundError if the checkpoint doesn't exist.
download_best_checkpoint¶
Download the latest/best checkpoint (last by filename sort order).
Raises: ResultsNotReadyError if no checkpoints are available.