Skip to main content

run

Function run 

pub fn run(
    scheduler: Arc<dyn Scheduler>,
    curves: &[LabeledCurve],
    direction: Direction,
    report_steps: &[u64],
    final_step: u64,
    seed: u64,
) -> Result<BenchReport>
Expand description

Runs scheduler over curves and records what it pruned.

Builds a single-objective study in direction, one trial per curve, and runs each trial’s objective so that it reports curves[i].value_at(step) at every report_steps value and returns its value at final_step. The scheduler’s Decision::Prune is honoured by the loop (via the ? on report), and the resulting per-trial fate is read back from storage.

seed is the study seed; it also derives each trial’s independent noise realization (noise_seed), so the whole run is reproducible from it.

§Errors

Error::InvalidSpace if direction is somehow empty (it never is), plus anything storage reports. A pruned trial is not an error — the loop records it and carries on.