Skip to main content
The truss train command provides subcommands for managing the full training job lifecycle.
truss train [COMMAND] [OPTIONS]

Universal options

The following options are available for all truss train commands:
  • --help: Show help message and exit.
  • --non-interactive: Disable interactive prompts (for CI/automated environments).
  • --remote TEXT: Name of the remote in .trussrc.

init

Initialize a training project from templates or create an empty project.
truss train init [OPTIONS]

Options

--examples
string
Template name or comma-separated list of templates to initialize. See the ML Cookbook for available examples.
--target-directory
string
Directory to initialize the project in. Defaults to current directory.
--list-examples
List all available example templates.

Examples

Initialize a project from a template:
truss train init --examples llama-8b-lora-unsloth
Initialize multiple templates:
truss train init --examples llama-8b-lora-unsloth,qwen3-8b-lora-dpo-trl
List available templates:
truss train init --list-examples
Create an empty training project:
truss train init

push

Submit and run a training job.
truss train push [OPTIONS] CONFIG

Arguments

CONFIG
string
required
Path to the training configuration file (e.g., config.py).

Options

--tail
Stream status and logs after submitting the job.
--job-name
string
Name for the training job.
--team
string
Team name for the training project. If not specified, Truss infers the team or prompts for selection.
The --team flag is only available if your organization has teams enabled. Contact us to enable teams, or see Teams for more information.

Examples

Submit a training job:
truss train push config.py
Submit and stream logs:
truss train push config.py --tail
Submit to a specific team:
truss train push config.py --team my-team-name
Submit with a custom job name:
truss train push config.py --job-name fine-tune-v1

logs

Fetch and stream logs from a training job.
truss train logs [OPTIONS]

Options

--job-id
string
Job ID to fetch logs from.
--project
string
Project name or project ID.
--project-id
string
Project ID.
--tail
Continuously stream new logs.

Examples

Stream logs for a specific job:
truss train logs --job-id abc123 --tail
View logs for a job without streaming:
truss train logs --job-id abc123

metrics

View real-time metrics for a training job including CPU, GPU, and storage usage.
truss train metrics [OPTIONS]

Options

--job-id
string
Job ID to fetch metrics from.
--project
string
Project name or project ID.
--project-id
string
Project ID.

Examples

View metrics for a specific job:
truss train metrics --job-id abc123

view

List training projects and jobs, or view details for a specific job.
truss train view [OPTIONS]

Options

--job-id
string
View details for a specific training job.
--project
string
View jobs for a specific project (name or ID).
--project-id
string
View jobs for a specific project ID.

Examples

List all training projects:
truss train view
View jobs in a specific project:
truss train view --project my-project
View details for a specific job:
truss train view --job-id abc123

stop

Stop a running training job.
truss train stop [OPTIONS]

Options

--job-id
string
Job ID to stop.
--project
string
Project name or project ID.
--project-id
string
Project ID.
--all
Stop all running jobs. Prompts for confirmation.

Examples

Stop a specific job:
truss train stop --job-id abc123
Stop all running jobs:
truss train stop --all

recreate

Recreate an existing training job with the same configuration.
truss train recreate [OPTIONS]

Options

--job-id
string
Job ID of the training job to recreate. If not provided, defaults to the last created job.
--tail
Stream status and logs after recreating the job.

Examples

Recreate a specific job:
truss train recreate --job-id abc123
Recreate and stream logs:
truss train recreate --job-id abc123 --tail

download

Download training job artifacts to your local machine.
truss train download [OPTIONS]

Options

--job-id
string
required
Job ID to download artifacts from.
--target-directory
path
Directory to download files to. Defaults to current directory.
--no-unzip
Keep the compressed archive without extracting.

Examples

Download artifacts to current directory:
truss train download --job-id abc123
Download to a specific directory:
truss train download --job-id abc123 --target-directory ./downloads
Download without extracting:
truss train download --job-id abc123 --no-unzip

deploy_checkpoints

Deploy a trained model checkpoint to Baseten’s inference platform.
truss train deploy_checkpoints [OPTIONS]

Options

--job-id
string
Job ID containing the checkpoints to deploy.
--project
string
Project name or project ID.
--project-id
string
Project ID.
--config
string
Path to a Python file defining a DeployCheckpointsConfig.
--dry-run
Generate a Truss config without deploying. Useful for previewing the deployment configuration.
--truss-config-output-dir
string
Path to output the generated Truss config. Defaults to truss_configs/<model_version_name>_<model_version_id>.

Examples

Deploy checkpoints interactively:
truss train deploy_checkpoints
Deploy checkpoints from a specific job:
truss train deploy_checkpoints --job-id abc123
Preview deployment without deploying:
truss train deploy_checkpoints --job-id abc123 --dry-run

get_checkpoint_urls

Get presigned URLs for checkpoint artifacts.
truss train get_checkpoint_urls [OPTIONS]

Options

--job-id
string
Job ID containing the checkpoints.

Examples

Get checkpoint URLs for a job:
truss train get_checkpoint_urls --job-id abc123

cache summarize

View a summary of the training cache for a project.
truss train cache summarize [OPTIONS] PROJECT

Arguments

PROJECT
string
required
Project name or project ID.

Options

--sort
string
Sort files by column. Options: filepath, size, modified, type, permissions.
--order
string
Sort order: asc (ascending) or desc (descending).
--output-format, -o
string
Output format: cli-table (default), csv, or json.

Examples

View cache summary:
truss train cache summarize my-project
Sort by size descending:
truss train cache summarize my-project --sort size --order desc
Export as JSON:
truss train cache summarize my-project --output-format json

Ignore files and folders

Create a .truss_ignore file in your project root to exclude files from upload. Uses .gitignore syntax.
.truss_ignore
# Python cache files
__pycache__/
*.pyc
*.pyo
*.pyd

# Type checking
.mypy_cache/

# Testing
.pytest_cache/

# Large data files
data/
*.bin