auto, fastest, or cheapest to route the workload. --yes skips the interactive spend confirmation.
Automatic routing
For a policy run, the CLI packages and uploads the source closure and attaches a typed Torch graph when it can capture one. Compute analyzes the workload, filters out incompatible candidates, and scores each remaining provider/GPU pair against a target-specific hardware profile.
The preflight quote shows the selected provider and GPU, locked rate, execution estimate, analysis warnings, and projected billed total. The CLI creates no run until you approve that quote or pass
--yes.
Routing uses execution time and provider execution cost. Queue and machine startup time are not part of the current score. If the analysis cannot establish facts such as accelerator compatibility or a safe memory bound, Compute returns an analysis error instead of guessing. If the API marks a quote as a selector fallback, the CLI refuses it unless you pass --allow-selector-fallback.
Automatic routing is opt-in. With no --gpu, Compute uses the decorator’s GPU selection or defaults to hotaisle/MI300X.
Flags
compute run --help is the live flag list.
What happens
- The CLI analyzes and packages the target file and its local imports.
- It uploads the payload and requests a rate-locked quote.
- For a routing policy, Compute analyzes the workload and selects a compatible provider/GPU pair.
- The CLI shows the preflight quote and asks for confirmation.
- The API creates the run if admission and credit allow it.
- A worker provisions a new machine, installs the image, runs the function, streams logs, then terminates the machine.
- You get a JSON return value, a receipt, and an empty
compute machineslist.
Provider vs SKU
An explicit SKU pins the hardware. Compute resolves its provider unless the SKU is ambiguous, in which case you must pass--provider or use PROVIDER/SKU.
A provider can also scope a routing policy:
--provider for a policy rather than writing vastai/cheapest. You do not pick a region or an instance template.
Detached vs wait
simple_mlp.py is in First run. The homepage workloads are Fine-tune, Reinforcement learning, and Batch inference.
Or do it in one shot with --wait.
Inspect
result is the function return value. receipt is billed minutes and the platform fee (see Billing).