MixtrainDocsBlog

List Workflows

mixtrain workflow list

List all workflows in the workspace.

mixtrain workflow list

Download Workflow

mixtrain workflow download <name>

Download workflow source files to a local directory for editing.

Options:

OptionDescription
--dir, -dTarget directory (defaults to ./<name>/)
--force, -fOverwrite existing directory
# Download to default directory (./<name>/)
mixtrain workflow download my-workflow

# Download to custom directory
mixtrain workflow download my-workflow --dir ./local-copy/

# Overwrite existing directory
mixtrain workflow download my-workflow --force

Upload Workflow

mixtrain workflow upload <name> --dir <path>

Upload local workflow files to update the workflow on the platform.

Options:

OptionDescription
--dir, -dLocal directory containing workflow files (required)
# Upload all files from directory
mixtrain workflow upload my-workflow --dir ./local-copy/

# Typical workflow: download → edit → upload
mixtrain workflow download my-workflow
# ... edit files locally ...
mixtrain workflow upload my-workflow --dir ./my-workflow/

Create Workflow

mixtrain workflow create <files...>

Create a workflow from files. Supports directories and glob patterns.

MixRoutine classes can also be created with mixtrain routine create, which uses the workflow CLI implementation and records routine trigger configuration.

Options:

OptionDescription
--name, -nWorkflow name (defaults to first .py filename)
--description, -dWorkflow description
--entrypoint, -eEntrypoint hint: file path, file:class, or class name
# Single directory (most common)
mixtrain workflow create ./workflow-dir/

# Multiple files
mixtrain workflow create main.py utils.py config.json

# Glob patterns
mixtrain workflow create "*.py" Dockerfile --name my-workflow

# With explicit name
mixtrain workflow create train.py --name training-job -d "PyTorch training"

# With --entrypoint to select a specific class from a multi-class directory:
# File only - scan only this file, must contain exactly one MixFlow class
mixtrain workflow create . --name train --entrypoint workflows/train.py

# File:Class - select a specific class inside a file
mixtrain workflow create . --name train --entrypoint workflows/train.py:TrainFlow

# Class-only - class name must be unique across all uploaded files
mixtrain workflow create . --name pipeline --entrypoint DataPipeline

# Routine class - equivalent routine-focused command
mixtrain routine create ./routine-dir/ --name embed-new-rows

Entrypoint hints

The --entrypoint (or -e) option lets you create a workflow from a specific class when your source directory contains multiple MixFlow. It supports three formats:

FormatExampleBehaviour
File only--entrypoint train.pyScans only that file. Must contain exactly one MixFlow class.
File:Class--entrypoint train.py:TrainFlowUses the named class in that file.
Class only--entrypoint DataPipelineScans all files for a class with that name. Must be unique.

Without --entrypoint, all .py files are scanned. The upload must contain exactly one workflow entrypointand no MixFlow classes.

Run Workflow

mixtrain workflow run <name> [--<input> <value> ...]

Run a workflow. Streams logs in real-time until completion.

Each argument in the workflow's run function can be passed via cli flags. Scalars, enums, and resource references (model/dataset/evaluation/workflow names) take a plain value; composite inputs (object, tuple, list, dict, tensor) take a JSON value. Flag names accept dashes or underscores — --learning-rate and --learning_rate are the same argument.

Run mixtrain workflow run <workflow-name> --help to see the available arguments.

Options:

OptionDescription
--<input> <value>Set a spec input by name, e.g. --epochs 10. Composite types take a JSON value.
--input-json, -iAll inputs as one JSON object, or a path to a JSON file. Per-input flags override matching keys.
--detach, -dStart run and exit without streaming logs

Inputs whose name collides with a built-in flag (e.g. image, timeout) can only be set through --input-json; --help marks these.

# Per-argument flags
mixtrain workflow run training-job --epochs 20 --batch-size 64

# A composite input as JSON
mixtrain workflow run training-job --config '{"lr": 0.01, "warmup": 100}'

# All inputs as one JSON object or file
mixtrain workflow run training-job -i '{"epochs": 20, "batch_size": 64}'
mixtrain workflow run training-job -i config.json --detach

View Workflow

mixtrain workflow get <name>

View workflow details and recent runs.

mixtrain workflow get training-job

List Runs

mixtrain workflow runs <name>

List all runs for a workflow.

mixtrain workflow runs training-job

Edit Workflow

mixtrain workflow edit <name>

View and modify workflow files and metadata.

Options:

OptionDescription
--file, -fEdit file in $EDITOR
--view, -vView file contents
--delete, -dDelete file/folder at this path
--add, -aAdd local files to workflow
--name, -nRename workflow
--description, -DUpdate description
--yes, -ySkip confirmation prompts
mixtrain workflow edit my-workflow              # List all files
mixtrain workflow edit my-workflow -v main.py   # View file contents
mixtrain workflow edit my-workflow -f main.py   # Edit file in $EDITOR
mixtrain workflow edit my-workflow --add ./src/ # Add files
mixtrain workflow edit my-workflow -d old.py    # Delete file
mixtrain workflow edit my-workflow -n new-name  # Rename workflow
mixtrain workflow edit my-workflow -D "Updated" # Update description

Cancel Run

mixtrain workflow cancel <name> <run_number>

Cancel a running workflow.

mixtrain workflow cancel training-job 5

Delete Workflow

mixtrain workflow delete <name>

Delete a workflow.

Options:

OptionDescription
--yes, -ySkip confirmation
mixtrain workflow delete training-job
mixtrain workflow delete training-job --yes

On this page