Module checkpoint
Expand description
Checkpoint references — atune moves references, never bytes.
The checkpoint contract is deliberately narrow: atune never interprets
checkpoint bytes. The guide shows it in use under population-based
training.
A trial records a
reference — a run-directory path, an artifact id, whatever string its
objective wrote — at a resource step, and the
framework only ever stores that reference and later hands it back to a
Fork or a
resume of the trial. oniro’s
run-dir checkpoints plug in as references without conversion.
§Where the reference lives
A trial’s checkpoint references ride a typed
StateBlob on a
Scope::Named slot keyed by the trial id
(checkpoint_scope). Retry, fan, constraint, and checkpoint resources all
use independent named keys; Scope::Trial remains only as a read-compatible
home for historical retry/fan v1 data.
Recording is done through
TrialCtx::record_checkpoint
and read back through
Study::trial_checkpoints /
Study::latest_checkpoint. A study
that never records a checkpoint writes no checkpoint state.
§Replicates of a multi-seed fan keep their own references
Each replicate of a SeedProtocol
fan is a separate run, so a reference one replicate records must not
replace another’s. Inside a fan, a recorded reference is kept under its
replicate index in TrialCheckpoints::replicates as well as in the
trial-level refs, whose meaning is unchanged:
the most recent reference recorded at each step. A replicate resumes from
its own latest reference when the source trial has one, and from the
trial-level latest otherwise. The field is optional in the version-1
payload: a blob without it reads as having no replicate references, and a
reader that predates it ignores it and still sees refs.
Structs§
- Trial
Checkpoints - The checkpoint references a trial has recorded, keyed by resource step.
Constants§
- CHECKPOINT_
BLOB_ KIND - The
kindtag of a trial’s checkpoint-reference state blob. - CHECKPOINT_
BLOB_ VERSION - The schema version of the
CHECKPOINT_BLOB_KINDpayload (TrialCheckpoints).
Functions§
- checkpoint_
scope - The
Scopea trial’s checkpoint references are stored under.