Skip to content
Repo

TrainConfig

from modal_training_gym.common.train import TrainConfig

A dataset, model, and recipe for one training run.

Attributes

dataset DatasetConfig

Training dataset materialized in the framework's /data volume.

model ModelConfig

Model identity and weight download behavior.

recipe SlimeRecipe | MilesRecipe

Training framework, Modal resources, and framework arguments.

checkpoint Checkpoint | None

Megatron checkpoint to resume from. model remains the source for tokenizer and architecture metadata.

detach bool

Keep training on Modal if the local train() wait is interrupted. False stops the app. Default: True

group_id str | None

Sweep ID assigned by TrainingGroup.

group_overrides dict[str, Any] | None

Variant overrides keyed by dotted field path.

group_axes list[str] | None

Swept field paths that group dashboard variants.

context_plan_line() -> str | None

Summarize effective context length and parallelism on one line.

framework: Framework
launch(*, show_output: bool = True, prepare_inputs: bool = False) -> TrainingRun

Start one training run in a detached Modal app.

Returns

The launched training run.

train(*, show_output: bool = True) -> TrainResult

Run one training configuration.

Returns

The completed training result.