osmose.calibration.checkpoint¶
Calibration checkpoint module — atomic on-disk progress snapshots.
Read by the Shiny dashboard at 1 Hz; written by every optimizer (DE / CMA-ES / surrogate-DE / NSGA-II) every N generations.
See docs/superpowers/specs/2026-05-12-calibration-dashboard-design.md for the full contract and 14 invariants enforced in CalibrationCheckpoint.__post_init__.
Functions
|
Baltic default — OSMOSE_RESULTS_DIR env override, else package-root-resolved data/baltic/calibration_results/. |
|
True iff (now - max_age_s) < mtime <= now. |
|
Three-state liveness classification per spec §7. |
|
Write a temporary probe file; raise OSError on permission/missing-dir failure. |
|
Read and validate a checkpoint file. |
|
Atomic write: serialise to a .tmp file then os.replace into place. |
Classes
|
Atomic snapshot of a calibration run, written every N generations. |
|
Discriminated read result. |
|
One atomic view of the results directory per scan tick. |