Skip to content
GitHub
View on GitHub

TrainResult

One completed training run's checkpoint handle.

from modal_training_gym.common.train_result import TrainResult

One completed training run’s checkpoint handle.

TrainResult(app_name, framework, training_run_id, checkpoint_dir='', checkpoints_volume_name='', checkpoints_mount_path='', model_config=None, extra=<factory>)
ParameterTypeDefaultDescription
app_namestrrequired
frameworkFrameworkrequired
training_run_idstrrequired
checkpoint_dirstr""
checkpoints_volume_namestr""
checkpoints_mount_pathstr""
model_config'ModelConfig | None'None
extradict[str, Any]<factory>
AttributeTypeDefaultDescription
app_namestr
frameworkFramework
training_run_idstr
checkpoint_dirstr""
checkpoints_volume_namestr""
checkpoints_mount_pathstr""
model_config'ModelConfig | None'None
extradict[str, Any]{}

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.

load(training_run_id: 'str') -> "'TrainResult'"

Section titled “load(training_run_id: 'str') -> "'TrainResult'"”

Persist this result to the shared metadata volume.

Async variant of :meth:save. Use from inside an event loop.

Source: modal_training_gym/common/train_result.py