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. It arrives by temporary file and 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
{"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, from the manifest
selectionstringeverything off the file's defaults, variant=small lr=0.003, or default
devicestringcpu or cuda
statestringrunning, done, 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 run started
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 wrote
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. A run killed outright (SIGKILL, the machine gone) writes nothing more, so its file keeps the last document and still reads running; compare updated_ms with the clock. What a signal leaves is in checkpoints.

Poll this file rather than parsing the log: log lines are for humans and their format is not stable.

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
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.