checkpoint
Checkpoint - parse the checkpoints.jsonl manifests algorithms write.
Tinker SFT/RL (and any other algorithm that follows the same convention)
appends one JSON row per saved checkpoint to \<output_dir>/checkpoints.jsonl:
{"name": "final", "batch": 1520, "epoch": 10, "state_path": "tinker://...", "sampler_path": "tinker://..."}
Researcher scripts repeatedly hand-roll a few lines to find this manifest, parse it, and pick the right row to evaluate against. This module gives them:
Checkpoint- one row, typed.read_manifest(path)- full ordered list.find_manifest(run_dir)- locate the manifest under a run directory.Checkpoint.pick_final(checkpoints)- pick the "evaluate me" row (prefername == "final", else the last row that exposes a path).
attributeMANIFEST_NAME= 'checkpoints.jsonl'attribute__all__= ['Checkpoint', 'MANIFEST_NAME', 'find_manifest', 'read_manifest']funcread_manifest(path) -> list[Checkpoint]Parse a checkpoints.jsonl into ordered Checkpoint rows.
Blank lines are skipped; malformed JSON raises ValueError (don't
silently lose checkpoint pointers - the eval step depends on them).
parampathstr | PathReturns
list[evsys_sdk.checkpoint.Checkpoint]funcfind_manifest(run_dir) -> Path | NoneLocate checkpoints.jsonl under run_dir (recursive).
Algorithms sometimes nest the manifest under a sub-directory
(e.g. \<run_dir>/\<sub>/checkpoints.jsonl); search shallowest-first
and return the first match. Returns None if no manifest exists.
paramrun_dirstr | PathReturns
pathlib.Path | Nonefunc_as_int(v) -> int | NoneparamvAnyReturns
int | Nonefunc_as_str(v) -> str | NoneparamvAnyReturns
str | None