Nestor docs
Runs

Runs

Run evaluations and batch jobs before and after you ship. A Run executes a finite program once on a dedicated GPU and gives you its logs, its result files and its exit status. There is no cluster to keep warm: the GPU is allocated when the Run starts and released when it ends.

nestor run evaluate.py --wait
from nestor import Nestor

client = Nestor()
run = client.run("evaluate.py", wait=True)
print(run.state, run.failure_reason)

What the program does is up to you: score a model against a test set, embed a corpus, transcode files, quantize or export a model. Nothing in it needs to import Nestor.

Submit

nestor run evaluate.py --wait                          # packages the file's directory
nestor run . --command 'python batch.py --shard 3' --wait
nestor run . --command 'python eval.py' --gpu A100_80G_SXM --wait
nestor run . --command 'python eval.py' \
  --input /data/test=nestor://data/dat_… --secret OPENAI_API_KEY=sec_… --wait
OptionCLISDKNotes
Sourcepath (default .)sourceA directory, or one .py file with its directory. Or --source-image IMAGE@sha256:… when the program is already in an image.
Command--command '…'command=Runs directly, without a shell. Use bash -lc '…' for pipes and &&.
GPU--gpu FAMILY, --gpus N, --region Rgpu=, gpus=, region=Default: Auto and one GPU.
Environment--image IMAGE@sha256:…image=Default: managed Python 3.12.
Inputs--input /data/PATH=REFERENCEinputs=[…]Data items or earlier run files, read-only.
Secrets--secret ENV=sec_…secrets={…}Secrets as environment variables.
Limits--timeout-seconds, --grace-secondstimeout_seconds=, termination_grace_seconds=Default 24 hours (maximum 7 days) and 30 s.
Retry safety--idempotency-key KEYidempotency_key=The same key and request returns the same Run.

Source packaging, environments and capacity work exactly as for training runs. Every Run gets a GPU, even for steps that only need a CPU; CPU-only Runs are not available.

Results

Write result files under $NESTOR_OUTPUTS. Every regular file there when the program stops is saved with its path, size and SHA-256 digest, including after a failure or cancellation. Write under a temporary name and rename when complete.

import json, os
from pathlib import Path

out = Path(os.environ.get("NESTOR_OUTPUTS", "outputs"))
out.mkdir(parents=True, exist_ok=True)
(out / "scores.json").write_text(json.dumps(scores))
nestor runs outputs tr_…
nestor runs download tr_… tf_… ./scores.json

Downloads verify size and digest before replacing the destination. Results are published as Data and stay available after the Run is deleted.

Follow, wait and cancel

nestor runs list --state RUNNING
nestor runs logs tr_… --follow
nestor runs wait tr_… --timeout 3600
nestor runs cancel tr_…
nestor runs rerun tr_…

A Run moves through QUEUED, PREPARING and RUNNING to SUCCEEDED, FAILED or CANCELED; see Training for each state and failure reason. nestor run --wait and nestor runs wait exit 0 when the Run succeeded, 9 for any other final state, and 10 when the local timeout passed first. Stopping the CLI or reaching its timeout never cancels the Run.

Use Runs in a release process

Because exit codes are stable, a Run fits into CI: run your evaluation against a candidate model, fail the pipeline on a non-zero exit, and keep the scores as a downloadable result.

nestor run . --command 'python eval.py --model candidate' \
  --idempotency-key "eval-$GIT_SHA" --wait || exit 1

How Runs relate to Training

A Run is a training run underneath, with the same IDs (tr_…), quotas and billing. nestor runs and nestor training runs show the same jobs, and in the Console they appear under Training. Not available yet: scheduled Runs, pipelines and multi-step workflows, distributed execution, and recording an Application on a Run (use nestor training runs create --application).

Documentation source ad860f2fd0ba

On this page