S-exp GPU
All pages
Docs · Observing a runMarkdown

The status file

Where a live run is, as one JSON file, for a poller: an agent, a script over ssh, a dashboard. It is rewritten after every step and every evaluation and once more when the run ends or dies, by rename, so a reader sees a whole document or none. A failure to write it is printed and never ends a run.

It goes where SEXPGPU_STATUS, or --status, says; without either there is none. sweep gives each point its own, status-0.json, status-1.json; see sweep.

$ sexpgpu run my-run.sx --status /tmp/my-run.json
$ jq -c . /tmp/my-run.json
{"time_budget":null,"slug":"my-run","entry":"my-run.sx","selection":"default","device":"cpu","state":"done","error":null,"step":20,"steps":20,"records":160,"counters":{"tokens":2720},"train_loss":2.620679,"eval":[["eval/loss",2.462187]],"wall_seconds":0.214606417,"seconds_per_step":0.007608008449999999,"remaining_seconds":0.0,"checkpoint":null,"resumed_from":null,"metrics":null,"updated_ms":1789925843464}
keytypemeaning
slugstringthe run slug
entrystringthe experiment file, as its setup names it
selectionstringeverything off the file's defaults, variant=small lr=0.003, or default
devicestringcpu, reference, cuda, rocm or metal
statestringrunning, done, budget-limited, interrupted or failed
errorstring or nullwhat ended the run, when something did
stepnumberoptimizer steps completed
stepsnumberthe run's total
recordsnumberloader records consumed
countersobjectevery declared counter's running total
train_lossnumber or nullthe last training loss, train/loss when reported
evalarray of [name, value]the last observations of the pass named eval, or of the first pass, diagnostics aside
wall_secondsnumbersince the training loop was set up, excluding compilation and device preparation; time_budget.elapsed_seconds is the whole timed session
time_budgetobject or nullthe session budget report, including final work and overrun
seconds_per_stepnumber or nullthe mean of the last twenty steps
remaining_secondsnumber or nullthat mean times the steps left
checkpointstring or nullthe last checkpoint this run stored
resumed_fromstring or nullthe checkpoint this process continued from; null for a fresh start, including a --resume latest that found none
metricsstring or nullthe dashboard URL or the JSONL path
updated_msnumberwhen this document was written

Read it with jq .state, a cat over ssh, or any JSON reader; poll it rather than parsing the log, whose lines are for humans and not stable. A run killed outright (SIGKILL, the machine gone) writes nothing more, so its file still reads running; compare updated_ms with the clock. What a signal leaves is in checkpoints.

The summary

What run prints when it ends: the done: block on standard error, or one JSON object of kind summary on standard output with --json.

fieldmeaning
outcomedone or budget-limited for a successful CLI return
time_budgetthe session budget report, or null when unlimited
stepssteps completed
train_lossthe last training loss
evalthe last observations of the pass named eval (or the first pass), diagnostics aside, as an object
countersrecords plus every declared counter
stagethe curriculum stage the run ended in
metricsthe dashboard URL or the JSONL path
statusthe status file's path, or null

Related: metrics, run, working as an agent.