Module scheduler
Expand description
The scheduler seam: how a running trial’s fate is decided.
A scheduler is a superset of a pruner. Conflating the two — as Optuna
does — makes pause, resume and fork inexpressible, which rules out the
entire PBT/PASHA family (the
scheduler). Here a pruner is
simply a scheduler that only ever answers Decision::Continue or
Decision::Prune.
Two shapes are load-bearing:
Scheduler::on_reporttakes a slice of values, because pruning is multi-objective-aware from day one (an acknowledged gap in prior art);stepis counted in the study’s declaredResourceUnit, so multi-fidelity arithmetic is explicit rather than “whateverstepmeant to the caller”.
§The built-in schedulers
| Scheduler | Kind | Acts when |
|---|---|---|
NopScheduler | none | never — the default |
MedianPruner | pruner | worse than the percentile of the completed trials at the same step (variance-aware variant available) |
AshaPruner | pruner | not in the top 1/η of the trials that reached a rung |
HyperbandPruner | pruner | as ASHA, within a crc32(study, trial)-assigned bracket |
FreezeThaw | scheduler | pauses underperformers by extrapolated learning-curve asymptotes and resumes promising paused trials when a slot opens |
Patient | decorator | delays an inner prune until N non-improving reports |
WilcoxonPruner | pruner | significantly worse than the incumbent under a paired signed-rank test |
Pbt | scheduler | forks an underperformer from a top performer at each interval (exploit + explore) |
Pbt is the first scheduler that uses Decision::Fork rights — a
population of trials in which an underperformer copies and perturbs a top
performer’s checkpoint (the guide’s population-based
training walks it end to end).
ASHA and Hyperband share a reusable rung core — the RungLadder of
resource levels, the is_promotable promotion rule, and the storage-free
bracket_of bracket assignment — which M4’s DEHB reuses unchanged.
§Determinism honesty
Every real scheduler here decides from the ask-time
StudyView — median/percentile against the trials
completed by then, ASHA/Hyperband against whichever trials had filled a rung.
That set is completion-order dependent under parallelism, so a scheduled
study is replayable (its recorded history explains every prune) rather than
pre-determined (computable from the seed before it runs) — exactly the
standing of a history-dependent sampler (determinism,
honestly).
Under a single worker with a fixed seed the completion order is fixed, so the
pruning is fully reproducible. Each scheduler restates this in its own docs.
§Status
M1.1 froze the declarations; M1.3 added NopScheduler; M3.1 adds the real
pruners above; M4.1 adds Pbt, the first fork-capable population scheduler.
Structs§
- Asha
Pruner - The asynchronous successive-halving pruner.
- Freeze
Thaw - The freeze-thaw scheduler: pause many, extrapolate, resume the promising few.
- Hyperband
Pruner - Asynchronous Hyperband: a fan of
AshaPrunerbrackets over one ladder. - Median
Pruner - Median / percentile stopping.
- NopScheduler
- Lets every trial run to completion.
- Patient
- A decorator that delays an inner scheduler’s prune until a trial has stopped improving.
- Pbt
- Population-based training: exploit-and-explore at a fixed interval — the guide’s population-based training runs one end to end.
- Pow3Fit
- A fitted Domhan pow-3 power law
y(t) = c − a·t^(−α). - Rung
Ladder - A geometric ladder of resource levels a successive-halving scheduler gates trials at.
- Rung
Occupancy - One rung of a
RungTable: the resource level and every value that reached it. - Rung
Table - The typed, serializable snapshot of a whole ladder’s occupancy.
- Wilcoxon
Pruner - A statistical pruner: prune a trial that is significantly worse than the incumbent under a paired Wilcoxon signed-rank test.
- Wilcoxon
Report - The result of a paired Wilcoxon signed-rank test over a set of differences.
Enums§
- Command
- Something a scheduler asks the study loop to do.
- Decision
- What should happen to a trial that just reported.
- Dispersion
- How the variance-aware variant estimates the spread of the competitors at a step.
- FanReport
Mode - How a scheduler composes with a multi-seed trial fan.
- Perturb
- How a scalar hyperparameter is perturbed during the explore step.
- Scripted
Scheduler Capability - Scheduler behavior that the scripted CLI can reconstruct exactly in a new process.
Constants§
- DEFAULT_
ALPHA - The default significance level for
WilcoxonPruner. - DEFAULT_
BOTTOM_ FRACTION - The default exploit quantile: the bottom 20% of the population exploit (Jaderberg et al., 2017).
- DEFAULT_
FREEZE_ FACTOR - The default reduction factor
ηfor the extrapolated-asymptote promotion rule: keep the top half of the field by predicted asymptote, freeze the rest. - DEFAULT_
KAPPA - The default acquisition exploration coefficient
κinĉ + κ·σ̂. - DEFAULT_
MIN_ PAIRS - The default minimum number of paired reports before
WilcoxonPrunerwill prune. - DEFAULT_
MIN_ POINTS - The default minimum number of curve points before a trial can be modelled.
- DEFAULT_
PERTURB_ DOWN - The default multiplicative perturbation applied when exploring down.
- DEFAULT_
PERTURB_ UP - The default multiplicative perturbation applied when exploring up.
- DEFAULT_
REDUCTION_ FACTOR - The default reduction factor
η: keep the top third at each rung. - DEFAULT_
TOP_ FRACTION - The default top quantile: an exploit copies a random member of the best 20% (Jaderberg et al., 2017).
- FREEZE_
THAW_ BLOB_ KIND - The
kindtag of the persisted curve-storeStateBlob. - FREEZE_
THAW_ BLOB_ VERSION - The schema version of the
FREEZE_THAW_BLOB_KINDpayload. - MIN_
ALPHA - The smallest decay exponent
αa pow-3 fit may report and still be trusted as an asymptote — the shape half of the extrapolation fail-safe. - MIN_
REDUCTION_ FACTOR - The smallest reduction factor that makes a ladder grow.
- REMAINING_
FACTOR - The largest extrapolated improvement a pow-3 fit may predict, as a multiple of the improvement already observed — the magnitude half of the fail-safe.
Traits§
- Scheduler
- Decides the fate of running trials.
Functions§
- bracket_
of - Which Hyperband bracket a trial belongs to — deterministic, storage-free.
- crc32_
ieee - The IEEE (reflected, polynomial
0xEDB8_8320) CRC-32 ofbytes. - fit_
pow3 - Fits the Domhan pow-3 law
y(t) = c − a·t^(−α)topoints(each(t, y)witht ≥ 1) by in-house Levenberg–Marquardt least squares. - is_
promotable - The asynchronous successive-halving promotion rule.
- wilcoxon_
signed_ rank - The paired Wilcoxon signed-rank statistic of a set of
differences. - wilcoxon_
worse - Whether
candidateis significantly worse thanincumbentunder a paired signed-rank test at levelalpha, requiring at leastmin_pairseffective (non-zero) pairs.
Type Aliases§
- Scheduler
State - Scheduler state as the framework persists it.