Skip to main content

Module freeze_thaw_bench

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 FreezeThaw gate. 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 gate is that those two, long wired into the study loop but unused by any built-in scheduler, 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/concepts/determinism.md).

Structs§

DecisionLog
The decisions a RecordingScheduler observed, keyed by trial id.
FreezeThawReport
The result of driving a whole scenario through the freeze-thaw scheduler.
RecordingScheduler
A [Scheduler] decorator that records the pauses and resumes of the scheduler it wraps, delegating every decision (and its persisted state) unchanged.
TrialOutcome
What one trial did under the freeze-thaw scheduler.

Functions§

run
Runs scheduler over curves and records the exact freeze/thaw behaviour.