wai-quantum: an optimisation stops and goes on to the same bytes #597

Closed
dcharlot wants to merge 1 commit from wai/quantum-optimize-resume into main

2026-11-03

Transaction Science
wai-quantum: an optimisation stops and goes on to the same bytes
Some checks failed
WAI energy receipts / energy receipts · linux (pull_request) Has been cancelled
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Has been cancelled
WAI energy receipts / energy receipts · macos (pull_request) Has been cancelled
WAI conformance / does this change touch it (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · linux (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · macos (pull_request) Has been cancelled
WAI conformance / fast integer kernels, every x86_64 kernel set (AVX-512 silicon) (pull_request) Has been cancelled
WAI conformance / quantum core and corpus under wasm32-wasip2 (wasmtime) (pull_request) Has been cancelled
WAI conformance / faces from keypoints under wasm32-wasip2 (wasmtime) (pull_request) Has been cancelled
WAI conformance / v2 vocabulary · manifests validate as stated (pull_request) Has been cancelled
WAI conformance / independent verifiers · claims, JWP, key discovery and integer payloads (Python) (pull_request) Has been cancelled
WAI conformance / each feature of the independent verifiers' steps compiles alone (pull_request) Has been cancelled
WAI conformance / delivery telemetry · CMCD and CMSD against an independent library (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · linux (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · macos (pull_request) Has been cancelled
WAI conformance / codec wrappers · fuzz smoke, text decode limits, C entry points, provenance, the semantic path (pull_request) Has been cancelled
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Has been cancelled
WAI operation catalogue / does this change touch it (pull_request) Has been cancelled
WAI operation catalogue / the catalogue and every door · linux (pull_request) Has been cancelled
WAI breaking changes and the conformance runner / WAI breaking · does this change touch WAI (pull_request) Has been cancelled
WAI breaking changes and the conformance runner / WAI breaking · wire, record and API against main · linux (pull_request) Has been cancelled
WAI breaking changes and the conformance runner / WAI breaking and conform · their tests, and the independent verifiers through wai conform · linux (pull_request) Has been cancelled
wai-audit collector and player integration / does this change touch it (pull_request) Has been cancelled
wai-audit collector and player integration / collector · linux (pull_request) Has been cancelled
wai-audit collector and player integration / collector, player integration and the browser end to end · macos (pull_request) Has been cancelled
standards workspaces build + test / which workspaces this change touches (pull_request) Has been cancelled
standards workspaces build + test / macOS energy backends (pull_request) Has been cancelled
repository checks / lockfiles, advisories, tests in CI, workflow hygiene, spec and section references, public text (pull_request) Has been cancelled
A long optimisation ran to its end in one process or not at all; one
killed partway lost every step. The engine's optimiser now runs from a
checkpoint (engine::variational::optimize_resumable, call_optimize): after
every step its caller has the run as it stands and may stop it there, and
the checkpoint, wai.quantum.optimize-checkpoint/1, holds the steps taken
with their links and the optimiser's whole state (the point, Adam's
moments and the powers of its betas, SPSA's stream, the best point and the
counts), every number as the bits of its f64. Gone on with from any step,
a run ends with the same bytes as one that never stopped, for each
optimiser; a checkpoint of another request, or one whose steps were
changed, is refused (J052).

wai-quantum optimize --checkpoint FILE keeps the state in FILE as it goes
(at most once a second, and when it stops; written whole or not at all),
goes on from FILE when it is there, and removes it when the run ends; a
run killed and started again with the same arguments ends with the same
bytes, receipt and all. --slice N takes at most N steps, then stops with
the state kept (exit 2).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-03 02:05:08 -05:00