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.

Constructed and persisted by each framework’s train function at the end of a run, and loaded by eval scripts via :meth:load. All fields are pure data — no method connects to Modal until explicitly invoked.

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

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'"”

save(self, *, is_async: 'bool' = False) -> 'None | Awaitable[None]'

Section titled “save(self, *, is_async: 'bool' = False) -> 'None | Awaitable[None]'”

Source: modal_training_gym/common/train_result.py