Use mixtrain routine to create and manage routines, inspect runs or run a routine manually.
List Routines
mixtrain routine listList all routines in the workspace.
Options:
| Option | Description |
|---|---|
--json | Output raw routine data as JSON |
mixtrain routine list
mixtrain routine list --jsonCreate Routine
mixtrain routine create <files...>Create a routine from files. Supports directories and glob patterns. Mixtrain detects the MixRoutine entrypoint and records its trigger configuration.
Options:
| Option | Description |
|---|---|
--name, -n | Routine name (defaults to first .py filename) |
--description, -d | Routine description |
--entrypoint, -e | Entrypoint hint: file path, file:class, or class name |
mixtrain routine create ./embed-new-rows --name embed-new-rows
mixtrain routine create . --name nightly-eval --entrypoint routines/nightly.py:NightlyEval
mixtrain routine create . --name refresh-index --entrypoint RefreshIndexEntrypoint Hints
Use --entrypoint when the upload contains more than one candidate class.
| Format | Example | Behavior |
|---|---|---|
| File only | --entrypoint routines/nightly.py | Scans only that file. It must contain exactly one MixRoutine class. |
| File:Class | --entrypoint routines/nightly.py:NightlyEval | Uses the named class in that file. |
| Class only | --entrypoint NightlyEval | Scans all files for a class with that name. It must be unique. |
Run Routine
mixtrain routine run <name> [--<input> <value> ...]Run a routine manually.
Each argument in the routine's run function is can be passed via cli flags. Scalars/enums/
resource references take a plain value; composite inputs — object, tuple, list,
dict, tensor — take a JSON value). Run mixtrain routine run <routine-name> --help to see the available
arguments.
Dataset-triggered routines accept trigger overrides; schedule and completion triggers run immediately with no extra input.
Options:
| Option | Description |
|---|---|
--<input> <value> | Set a spec input by name. Composite types take a JSON value. |
--input-json, -i | All inputs as one JSON object, or a path to a JSON file. Per-input flags override matching keys. |
--trigger-dataset | Dataset to read for a dataset-triggered run |
--trigger-from-version | Start version (default: beginning) |
--trigger-to-version | End version (default: latest) |
--detach, -d | Start run and exit without streaming logs |
--gpu | GPU type |
--gpu-per-node | GPUs per node |
--cpu | CPU cores |
--memory | Memory in MB |
--timeout | Max execution time in seconds |
--image | Docker image URL |
mixtrain routine run embed-new-rows
mixtrain routine run embed-new-rows --detach
mixtrain routine run nightly-eval --limit 100
# Replay a dataset-triggered routine over a version range
mixtrain routine run embed-new-rows --trigger-dataset photos --trigger-from-version 3View Routine
mixtrain routine get <name>View routine details, trigger configuration, and recent runs.
List Runs
mixtrain routine runs <name>List runs for a routine.
Options:
| Option | Description |
|---|---|
--limit, -n | Maximum runs to show |
mixtrain routine runs embed-new-rows
mixtrain routine runs embed-new-rows --limit 100View Logs
mixtrain routine logs <name> <run_number>View logs for a routine run.
Options:
| Option | Description |
|---|---|
--follow, -f | Stream logs continuously |
mixtrain routine logs embed-new-rows 3
mixtrain routine logs embed-new-rows 3 -fEdit Routine
mixtrain routine edit <name>View and modify routine files and metadata.
Options:
| Option | Description |
|---|---|
--file, -f | Edit file in $EDITOR |
--view, -v | View file contents |
--delete, -d | Delete file/folder at this path |
--add, -a | Add local files to routine |
--include-ignored | Include files matched by .gitignore when adding files |
--name, -n | Rename routine |
--description, -D | Update description |
--entrypoint, -e | Update or clear the routine entrypoint hint |
--yes, -y | Skip confirmation prompts |
mixtrain routine edit embed-new-rows
mixtrain routine edit embed-new-rows -v routine.py
mixtrain routine edit embed-new-rows -f routine.py
mixtrain routine edit embed-new-rows --add ./src/
mixtrain routine edit embed-new-rows -d old.py
mixtrain routine edit embed-new-rows -n index-new-rows
mixtrain routine edit embed-new-rows -D "Embed newly appended rows"Download Routine
mixtrain routine download <name>Download routine source files to a local directory for editing.
Options:
| Option | Description |
|---|---|
--dir, -d | Target directory (defaults to ./<name>/) |
--force, -f | Overwrite existing directory |
mixtrain routine download embed-new-rows
mixtrain routine download embed-new-rows --dir ./local-copy/
mixtrain routine download embed-new-rows --forceUpload Routine
mixtrain routine upload <name> --dir <path>Upload local routine files to update the routine on the platform.
Options:
| Option | Description |
|---|---|
--dir, -d | Local directory containing routine files (required) |
--include-ignored | Include files matched by .gitignore |
mixtrain routine upload embed-new-rows --dir ./local-copy/Cancel Run
mixtrain routine cancel <name> <run_number>Cancel a running routine.
mixtrain routine cancel embed-new-rows 5Delete Routine
mixtrain routine delete <name>Delete a routine.
Options:
| Option | Description |
|---|---|
--yes, -y | Skip confirmation |
mixtrain routine delete embed-new-rows
mixtrain routine delete embed-new-rows --yes