from modal_training_gym.common.train_result import TrainResultOne completed training run’s checkpoint handle.
Constructor
Section titled “Constructor”TrainResult(app_name, framework, training_run_id, checkpoint_dir='', checkpoints_volume_name='', checkpoints_mount_path='', model_config=None, extra=<factory>)| Parameter | Type | Default | Description |
|---|---|---|---|
app_name | str | required | |
framework | Framework | required | |
training_run_id | str | required | |
checkpoint_dir | str | "" | |
checkpoints_volume_name | str | "" | |
checkpoints_mount_path | str | "" | |
model_config | 'ModelConfig | None' | None | |
extra | dict[str, Any] | <factory> |
Attributes
Section titled “Attributes”| Attribute | Type | Default | Description |
|---|---|---|---|
app_name | str | ||
framework | Framework | ||
training_run_id | str | ||
checkpoint_dir | str | "" | |
checkpoints_volume_name | str | "" | |
checkpoints_mount_path | str | "" | |
model_config | 'ModelConfig | None' | None | |
extra | dict[str, Any] | {} |
Methods
Section titled “Methods”dashboard_url(self) -> 'str'
Section titled “dashboard_url(self) -> 'str'”URL for browsing the checkpoints volume in the Modal dashboard.
from_training_run_id(training_run_id: 'str') -> "'TrainResult'"
Section titled “from_training_run_id(training_run_id: 'str') -> "'TrainResult'"”Load a completed run’s result.
list_results() -> "list['TrainResult']"
Section titled “list_results() -> "list['TrainResult']"”load(training_run_id: 'str') -> "'TrainResult'"
Section titled “load(training_run_id: 'str') -> "'TrainResult'"”save(self) -> 'None'
Section titled “save(self) -> 'None'”Persist this result to the shared metadata volume.
save_async(self) -> 'None'
Section titled “save_async(self) -> 'None'”Async variant of :meth:save. Use from inside an event loop.