All pages
JSONL events
The metrics stream, as written to a jsonl: target or to stdout, is one
complete JSON object per line, each with ts_ms, the Unix epoch in
milliseconds. The stream can also go to
Metrics by 041. Targets are in
metrics.
Kinds
| kind | fields | when |
|---|---|---|
open | slug, description, metadata | the first line of the stream |
metric | step, name, value, metadata | one per number |
annotation | step, annotation, metadata | the lowering report, a choice made after it, the memory plan, a stage change, a checkpoint, a resume, an interruption, a failure |
done | slug | the last line of a successfully finished run, after which the file is flushed; a failed or interrupted run ends without one |
A metric carries what metric was called with, its metadata plus the
runtime's. A non-finite value fails the run before any target writes it.
run --json's summary line goes to standard output, never into a JSONL file;
with --metrics stdout it follows the last event on that stream. Metrics
accepts up to 64 KiB of compact JSON for annotation metadata, including step.
Above that limit, the largest values become counts such as
"673 products, 25 replay: too large to record". Small fields stay unchanged
when they fit. If the remaining fields still exceed the limit, the whole object
becomes a summary with its byte count. JSONL files and stdout keep the full
metadata.
{"ts_ms":1790189597015,"step":4,"kind":"metric","name":"eval/loss","value":3.2047,"metadata":{"pass":"eval","split":"eval","stage":"easy"}}
{"ts_ms":1790189597016,"step":4,"kind":"annotation","annotation":"stage easy -> hard","metadata":{"from":"easy","to":"hard"}}
{"ts_ms":1790189597025,"step":4,"kind":"metric","name":"train/loss","value":2.7658,"metadata":{"split":"train","stage":"hard"}}
{"ts_ms":1790189597025,"step":4,"kind":"metric","name":"rate/tokens","value":14530.17,"metadata":{"split":"train","stage":"hard"}}
{"ts_ms":1790189597055,"step":8,"kind":"annotation","annotation":"checkpoint /tmp/ckpt/step-00000008","metadata":{"checkpoint":"/tmp/ckpt/step-00000008","seconds":0.041}}
{"ts_ms":1790189597074,"kind":"done","slug":"my-run"}A consumer that wants numbers filters on "kind":"metric"; one that wants one
stage filters on metadata.stage too. Metric names are in
metrics.
Annotations
Only the runtime writes annotations; an experiment cannot.
| text | metadata | when |
|---|---|---|
lowering: <device> and the rest of the block | device, choices | a GPU run before its first step, or once its first step measured the stacking, at the step it starts from, so a resume on another machine records that machine's; the lowering report without the kernel list. A block over Metrics' 16,000 UTF-16 units drops graph lines from the end, says ... <n> more lines and keeps the lines after the graphs; the log and explain --device cuda have the whole block |
choices: <the report's choices line>, then one line per choice made since the last lowering or choices annotation, <what>: <new> or <what>: <old> -> <new> | device, choices | |
memory: ..., stacking ... | the plan's parts, the measured degrees, rank on a multi-GPU run | the memory plan and stacking choice before the first step; memory: allocation failed at step <n>; ... from each rank that recovered from a failed allocation by retrying; memory: peak ... of ... planned when the run ends |
stage <old> -> <new> | from, to | the curriculum moved the training loader |
training phase <name> | phase | the run moved to another training phase, at the update it starts |
checkpoint <path>, on o41:// then in <cloud> <region> (<match> match) and a line with any placement warning | checkpoint, seconds, on o41:// placement (location {id, cloud, region}, match: region, cloud or fallback) and warning | a checkpoint was written; seconds runs from the first tensor leaving the device to the last byte stored, what a spot VM's notice has to hold |
resumed from <path>, then one line per source or knob that moved | checkpoint, changed | the run continued from a checkpoint, at that step; changed holds the lines after the first, source <path> <old> -> <new>, knob <name> <old> -> <new>, load <param path> <old file> -> <new file> for a :load file's same bytes at another path, or ... is new / ... is gone, and is empty for the same files under the same selection |
note: training sources differ from the checkpoint (first differing loader: <n>); continuing saved sources and cursors; current source changes are ignored | none | a resumed run whose first differing training loader has another file list or manifest selection than the checkpoint recorded; it also goes to standard error |
interrupted by <signal> at step <n> | signal | a signal stopped the run after step n; a checkpoint annotation at the same step follows when there is a location |
failed: <error> | error | the run stopped; no done follows, and the o41 target gets an error event with the message |
rrun job <id> attempt <n> | job_id, attempt | an rrun job's process started, at the step it starts from: one per attempt, so a restart on another machine shows, and the job stays named after a later open replaces the metadata |
A CUDA run that makes or changes a choice after its lowering report, one
measured at a graph's first call for instance, sends a choices annotation at
the end of that step, or after its final evaluation passes. Its choices
metadata holds every choice so far, subject to the size limit in Metrics. JSONL
annotations and checkpoints retain every choice.
An isolated evaluate --metrics-slug stream sends done after its own passes
succeed. Ordinary offline evaluation keeps the training experiment's lifecycle.
See isolated rereads.
When an inline or offline evaluation opens a manifest, it emits an
evaluation data manifest annotation at that step. The annotation names the
pass, its set when knobs moved, its rank for a distributed run, and the
data_manifest as {uri, sha256, size_bytes}. Reopening the same URI on a
later pass records the bytes read by that pass.
When a distributed run uses training manifests, JSONL and stdout record a
training data manifests annotation at the starting step, once all ranks have
opened their loaders. Its metadata.data_manifests field lists the distinct
identities across the ranks.
The open metadata
The open event's metadata identifies the run. Metrics stores it as the
experiment's meta. An isolated evaluation adds
evaluation: {source_run, checkpoint, step} and describes its effective knobs,
selected passes and evaluation device.
| key | what it holds |
|---|---|
sexpgpu | the version number that compiled the run |
release | the exact build that ran it, the version sexpgpu --version prints after sexpgpu . An evaluation that reports into the training run's experiment records the build that trained the run |
binary_sha256 | the executable's SHA-256 as 64 lowercase hexadecimal digits; an evaluation reporting into the training experiment keeps the checksum recorded by its checkpoint |
ir_digest | the canonical program's sha256:<hex> digest, before the run's seed is mixed in; the identity printed by sexpgpu ir --digest. An evaluation reporting into the training experiment keeps the checkpoint's program identity |
bundle_sha256 | in an rrun job whose agent provides it, the SHA-256 of the uploaded archive, as 64 lowercase hexadecimal digits |
entry | the experiment file, as the setup records it |
variant | the selected variant, or null |
knobs | every knob with its bound value, --steps, --eval-every and --diagnostics overrides included |
data_manifests | distinct {uri, sha256, size_bytes} records for the data manifests that resolved the training loaders. The hash is lowercase hexadecimal and covers the raw bytes, including whitespace. |
run | steps, microbatches, evals (one {name, every, batches} per pass), checkpoint_every, precision, seed, diagnostics, diagnose_every, diagnose_first, and clip_grad_norm when set |
sources | one {path, sha256} per file the compile read: the entry, what it requires, the prelude <core> and the standard modules. Paths and hashes, never contents |
device | cpu, reference, cuda, rocm or metal |
devices | GPU ordinals in rank order, or [] |
rrun | in an rrun job, {"job_id": "<id>"}; absent otherwise |
The description is <slug>: <steps> steps of <entry>, or for an isolated
evaluation <slug>: evaluation of <source_run> at step <step>. If the metadata
passes 64 KiB of compact JSON, the most Metrics accepts, sources becomes
"<n> files, too large to record" and the rest survives.
data_manifests covers local paths, file:// paths and s3:// objects. A
resume carries the identities of saved loaders forward, even if a URI was
changed in place. Checkpoints written before provenance was collected have no
identities for their saved loaders. For distributed training, Metrics refreshes
the experiment metadata once all ranks have opened their loaders.
An evaluation reporting into a training experiment omits binary_sha256 and
ir_digest when the checkpoint did not record them. An isolated evaluation
records its own executable and effective program. If the executable cannot be
read, its checksum is omitted with a warning. These identities contain no source
text and cannot recover a missing source file.
A resumed run is the same experiment
The slug is the experiment. Metrics keeps one experiment
per slug, and an open on a slug it has returns that experiment, so a resume
reports into the same URL.
- A resume opens with the same description and metadata and marks itself with
the
resumed from <dir>annotation. When the metadata differs (another--steps), the newestopenreplaces the stored one. - Every
openis followed by a start that marks the experimentrunning, even after adone. A run stopped or killed sends nodoneand staysrunninguntil a resume of it finishes. - A run stopped by a signal with a checkpoint location repeats nothing. A run killed outright repeats the steps after its last checkpoint, and Metrics keeps both copies of those points; the annotation marks where the second process begins.
- A JSONL file a run resumes into holds one
openline per process with the metadata that process reported.
Related: metrics, checkpoints.