Module freeze_thaw_bench
Expand description
The FreezeThaw oracle’s driver: run a real Study with
FreezeThaw over synthetic curves and
record the exact set of trials it pauses and the exact set it resumes.
This is the M6.1 gate (docs/design/09-implementation.md §15). Where
scheduler_bench records what a pruner pruned,
this records what the freeze-thaw scheduler froze and thawed — because
FreezeThaw is the first scheduler that
emits Decision::Pause and
Command::ResumeTrial, and the
whole point of the slice is that those two, wired but unused since M4.0,
actually execute end to end.
§How pause and resume are driven and observed
The scheduler under test is wrapped in a RecordingScheduler, which
delegates every decision to the real scheduler and, alongside, logs each
Decision::Pause (with the trial and
step) and each Command::ResumeTrial
it returns. The objective continues from its checkpoint: a resumed trial
reads TrialCtx::parent_step
and reports only the steps beyond it, so a thawed trial advances its own curve
rather than restarting — which is exactly what makes the resume a resume and
not a fresh run.
Everything is single-worker (parallelism(1), the wasm-clean path) with a
fixed seed, so the whole pause/resume trajectory — and therefore the exact
paused and resumed sets — is reproducible (docs/design/09-implementation.md §5).
Structs§
- Decision
Log - The decisions a
RecordingSchedulerobserved, keyed by trial id. - Freeze
Thaw Report - The result of driving a whole scenario through the freeze-thaw scheduler.
- Recording
Scheduler - A
Schedulerdecorator that records the pauses and resumes of the scheduler it wraps, delegating every decision (and its persisted state) unchanged. - Trial
Outcome - What one trial did under the freeze-thaw scheduler.
Functions§
- run
- Runs
schedulerovercurvesand records the exact freeze/thaw behaviour.