Skip to main content

Job

A job is one execution of one benchmark on one device. A benchmark run over two models and three devices creates six jobs, each independent: its own status, its own result, its own log.

The job definition

A job definition is the template a job executes. It is self-contained, so anyone reading it can tell exactly what will happen on the device.

PartWhat it declares
artifactsFiles to push before anything runs, each with a destination path on the device.
setup_stepsCommands to run after the files land (create a virtual environment, install dependencies, start a helper service).
scriptThe benchmark itself: command, working directory, environment, timeout.
output_pathWhere the script must write its result file.
result_typeraw (keep the file) or structured (parse it into a result the platform can chart and compare).
teardown_stepsCommands that always run at the end, successful or not.
cleanup_policyWhat of the pushed files, output and scratch paths is removed afterwards.
required_resourcesMinimum CPU, memory, VRAM, disk, GPU count and accelerators the device must report.

For an ordinary benchmark you never write one of these and never pick one: the platform resolves the definition from the benchmark type and the device's platform and architecture. You write a definition when you are adding a new kind of benchmark to a deployment. Write a job definition covers the file in full.

What the platform does, and what your script does

The platform handles logistics: get the device into the right state, hand the script its inputs and an output path, run it, and collect what it produced. What happens inside the script is yours. The platform does not interpret your inference code, your timing, or how you talk to a local server. The one thing it requires is a result file at output_path.

States

QUEUED -> PUSHING_ARTIFACTS -> RUNNING_SETUP -> RUNNING -> RUNNING_TEARDOWN -> DONE
|-> FAILED
|-> PARTIAL
|-> INTERRUPTED
StateWhat is happening
QUEUEDWaiting for the device to finish its current job.
PUSHING_ARTIFACTSTransferring files, skipping any whose checksum already matches on the device.
RUNNING_SETUPExecuting the setup steps in order.
RUNNINGExecuting the script, streaming its output.
RUNNING_TEARDOWNExecuting the teardown steps.
DONEScript succeeded, teardown succeeded, output collected.
FAILEDA step failed, or the declared output file was never written.
PARTIALThe script succeeded and produced results, but teardown failed. The results are usable; the device is flagged dirty.
INTERRUPTEDThe device disconnected mid-run. Teardown is retried when it reconnects, and a late result can still complete the job.

A job dispatched to a device that is already busy is requeued with backoff rather than failed, and gives up after ten minutes of trying. The per-device queue is visible on the device page.

Two guarantees worth knowing

Teardown always runs. Whether the script succeeded, failed, timed out or was cancelled, the teardown steps execute. That is what stops a failed run from leaving a service running, a GPU held, or a temporary directory filling the disk. If teardown itself fails, the device is flagged dirty and takes no further benchmark jobs until it is cleared.

A cancel stops the whole process tree. Every step runs as its own process group, so cancelling a job (or hitting the script timeout) stops what the step started and everything it spawned. A job the platform reports as cancelled is not still holding the device's memory.

Collecting the output

When the script exits, the platform fetches the file at output_path, stores it as an artifact, and links it to the job. Four outcomes are deliberately distinguished.

  • Nothing at the declared path: the job fails, naming the path that was expected. Declaring an output path and not writing it is a broken contract with the platform, even when the script exited zero.
  • A file that is not a result envelope: the job completes with a diagnostic, and the raw file stays attached. The format was the script's own choice, and its exit code was its own verdict.
  • A valid envelope: the job completes and the result is parsed, charted and comparable.
  • The fetch failed for another reason (the device went away mid-transfer): the job completes and the failure is logged, because nothing was established about what is on the device.

Cleanup

After teardown, cleanup runs in a fixed order: your teardown steps first, then the pushed artifacts (unless the definition keeps them), then any custom paths, then the output path (only if the definition asks for it). The default removes pushed artifacts and keeps the output.

Definitions that push a large engine bundle usually keep it, because the checksum skip makes the next run fast only if the file is still there.

Where you see it

Jobs in the sidebar lists every job in the project. A device's Jobs tab lists what ran on that device, and a benchmark run's Details tab lists the jobs that run fanned out into.