View on GitHub
"```python\nfrom modal_training_gym.common.train_result import TrainResult\n```\n\nOne completed training run's checkpoint handle.\n\nConstructed and persisted by each framework's `train` function at\nthe end of a run, and loaded by eval scripts via :meth:`load`. All\nfields are pure data — no method connects to Modal until explicitly\ninvoked.\n\n## Constructor\n\n```python\nTrainResult(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>)\n```\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `app_name` | `str` | *required* | |\n| `framework` | `Framework` | *required* | |\n| `training_run_id` | `str` | *required* | |\n| `checkpoint_dir` | `str` | `\"\"` | |\n| `checkpoints_volume_name` | `str` | `\"\"` | |\n| `checkpoints_mount_path` | `str` | `\"\"` | |\n| `model_config` | `'ModelConfig \\| None'` | `None` | |\n| `wandb_project` | `str` | `\"\"` | |\n| `wandb_entity` | `str` | `\"\"` | |\n| `wandb_training_run_id` | `str` | `\"\"` | |\n| `group_id` | `str` | `\"\"` | |\n| `extra` | `dict[str, Any]` | `<factory>` | |\n\n## Attributes\n\n| Attribute | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `app_name` | `str` | | |\n| `framework` | `Framework` | | |\n| `training_run_id` | `str` | | |\n| `checkpoint_dir` | `str` | `\"\"` | |\n| `checkpoints_volume_name` | `str` | `\"\"` | |\n| `checkpoints_mount_path` | `str` | `\"\"` | |\n| `model_config` | `'ModelConfig \\| None'` | `None` | |\n| `wandb_project` | `str` | `\"\"` | |\n| `wandb_entity` | `str` | `\"\"` | |\n| `wandb_training_run_id` | `str` | `\"\"` | |\n| `group_id` | `str` | `\"\"` | |\n| `extra` | `dict[str, Any]` | `{}` | |\n\n## Methods\n\n### `from_training_run_id(training_run_id: 'str') -> \"'TrainResult'\"`\n\nLoad a completed run's result.\n\n### `load(training_run_id: 'str') -> \"'TrainResult'\"`\n\n### `save(self, *, is_async: 'bool' = False) -> 'None | Awaitable[None]'`\n\n### `volume(self) -> \"'Volume'\"`\n\n## Related Tutorials\n\n- [Qwen3-4B haiku evaluation with verifiable rewards — serve, evaluate, train, compare](/tutorials/rl/000_rl_basics/)\n\n**Source:** [`modal_training_gym/common/train_result.py`](https://github.com/modal-projects/training-gym/blob/main/modal_training_gym/common/train_result.py)\n"
TrainResult
One completed training run's checkpoint handle.
from modal_training_gym.common.train_result import TrainResultOne 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.
Constructor
Section titled “Constructor”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>)| 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 | |
wandb_project | str | "" | |
wandb_entity | str | "" | |
wandb_training_run_id | str | "" | |
group_id | str | "" | |
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 | |
wandb_project | str | "" | |
wandb_entity | str | "" | |
wandb_training_run_id | str | "" | |
group_id | str | "" | |
extra | dict[str, Any] | {} |
Methods
Section titled “Methods”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.