CreateTrainingJob

class baseten.client.managementapi.CreateTrainingJob(*, image, compute=None, runtime=None, name=None, truss_user_env=None, interactive_session=None, weights=None, enable_baseten_workdir=False, priority=None)

Bases: BaseModel

Parameters:
  • image (Annotated[CreateTrainingJobImage, FieldInfo(annotation=NoneType, required=True, examples=[{'base_image': 'hello-world', 'docker_auth': None}])])

  • compute (Annotated[CreateTrainingJobCompute | None, FieldInfo(annotation=NoneType, required=True, examples=[{'accelerator': {'accelerator': 'H100', 'count': 2}, 'availability_model': 'spot', 'cpu_count': 1, 'memory': '2Gi', 'node_count': 1}])])

  • runtime (Annotated[CreateTrainingJobRuntime | None, FieldInfo(annotation=NoneType, required=True, description='Configuration for the runtime environment of the training job.', examples=[{'artifacts': [], 'cache_config': None, 'checkpointing_config': {'checkpoint_path': None, 'enabled': False, 'volume_size_gib': None}, 'enable_cache': None, 'environment_variables': {'API_KEY': 'your_api_key_here', 'PATH': '/usr/bin'}, 'load_checkpoint_config': None, 'start_commands': ['python main.py']}])])

  • name (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, title='Name', description='Name of the training job.', examples=['gpt-oss-job'])])

  • truss_user_env (Annotated[TrussUserEnv | None, FieldInfo(annotation=NoneType, required=True, description='Truss user environment information')])

  • interactive_session (Annotated[InteractiveSessionConfig | None, FieldInfo(annotation=NoneType, required=True, description='Configuration for interactive debugging sessions.')])

  • weights (Annotated[list[CreateJobWeightConfig] | None, FieldInfo(annotation=NoneType, required=True, title='Weights', description='MDN weight sources to mount in the training container. Weights are mirrored and cached for fast startup.', examples=[[{'allow_patterns': None, 'auth': None, 'auth_secret_name': None, 'ignore_patterns': None, 'mount_location': '/app/models/base', 'source': 'hf://meta-llama/Llama-3-8B@main'}]])])

  • enable_baseten_workdir (Annotated[bool, FieldInfo(annotation=NoneType, required=True, title='Enable Baseten Workdir', description='When enabled, uses /b10/workspace as the working directory instead of the image WORKDIR.', examples=[False, True])])

  • priority (Annotated[int | None, FieldInfo(annotation=NoneType, required=True, title='Priority', description='Queue priority. Higher values are dequeued first. Defaults to 0.', examples=[0, 10, 100])])

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].