Skip to main content

AI Runtime CLI quickstart

Beta

The AI Runtime CLI is in Beta.

This page walks through submitting your first training job with the AI Runtime CLI. Before starting, install the CLI and configure authentication.

Step 1: Write a YAML config

Create train.yaml describing the workload. The minimal config requires an experiment name, an environment, a compute spec, and a command:

YAML
experiment_name: my-first-air-run
compute:
num_accelerators: 1
accelerator_type: GPU_1xA10
command: echo "hello AIR!"

For the full field reference, see Workload YAML reference.

Step 2: Submit the run

Submit the workload:

Bash
air run --file train.yaml

The CLI uploads your local code, submits the job, and prints a run ID.

To watch logs until completion, add --watch:

Bash
air run --file train.yaml --watch

Step 3: Inspect the run

Check status:

Bash
air get run <run-id>

Stream or download logs:

Bash
air logs <run-id>
air logs <run-id> --node 2
air logs <run-id> --download-only ./logs/

List recent runs:

Bash
air list runs --limit 10
air list runs --active

Cancel a run:

Bash
air cancel <run-id>

Common patterns

Override YAML fields from the command line:

Bash
air run --file train.yaml --override compute.num_accelerators=32 timeout_minutes=120

Validate the config without submitting:

Bash
air run --file train.yaml --dry-run

Make a submission safely retryable:

Bash
air run --file train.yaml --idempotency-key my-unique-key

If the same key has been used before, the existing run is returned instead of creating a new one.

Next steps