Struct Ceiling
pub struct Ceiling { /* private fields */ }Expand description
Prunes a trial whose first objective is worse than a fixed bound once it has reached a given step.
“Worse” follows the study’s first Direction:
above the bound when minimizing, below it when maximizing. A report equal to
the bound continues. A NaN report is pruned, because a run that diverged has
nothing left to show, and Direction::is_better would otherwise let it run
to the end. Reports before from_step always continue, which is the warm-up
every learning curve needs before its value means anything.
A pruner in the sense of the guide’s Write a scheduler page: it only ever
answers [Decision::Continue] or [Decision::Prune], so it needs neither
on_trial_end nor resume_candidates, and it persists nothing.
Implementations§
Trait Implementations§
impl Copy for Ceiling
§impl Scheduler for Ceiling
impl Scheduler for Ceiling
§fn fan_report_mode(&self) -> FanReportMode
fn fan_report_mode(&self) -> FanReportMode
Accepts a multi-seed fan’s aligned aggregate.
Safe to opt into because a decision reads one value at one step and nothing else: the aggregate of a fan is exactly such a value, and the decision applies to the whole logical trial.
§fn on_report(
&self,
study: &StudyView,
_trial: &TrialMeta,
step: u64,
values: &[f64],
) -> Result<Decision>
fn on_report( &self, study: &StudyView, _trial: &TrialMeta, step: u64, values: &[f64], ) -> Result<Decision>
Prunes a report worse than the bound at or after from_step.
§Errors
[Error::Scheduler] for a report that carries no value, or a study with
no direction. The study loop reads either as “no decision” and lets the
trial continue, which is the seam’s rule for a scheduler that cannot
decide.