Module trial
Expand description
Trials: state, snapshots, handles and deltas.
A trial is one evaluation of one configuration. Its life is a small state machine — the guide walks it in Studies and trials:
Waiting ──ask──► Running ──tell──► Complete
│ ├──report──► (intermediate values, heartbeat)
│ ├──scheduler──► Pruned | Paused ──resume──► Running
└──panic/err──► Failed { error, retries }Three rules matter beyond the diagram:
- Finished trials are immutable.
Complete,PrunedandFailedare terminal; storage rejects writes to them. - A pruned trial adopts its last intermediate value as its objective
value (
FrozenTrial::objective_value). ASHA’s correctness depends on it. - Failed trials are invisible to samplers but their record, parameters and error text survive. Losing them (as some prior art does) throws away the most interesting data a tuning run produces.
Structs§
- Frozen
Trial - The immutable snapshot of a trial.
- Trial
Delta - One change to one trial, as seen through
Storage::sync. - Trial
Meta - The lightweight handle a sampler receives for the trial it is sampling.
- Trial
Record - What storage returns when a trial is created.
- Trial
Template - A request to create a trial with something already decided.
Enums§
- Trial
State - Where a trial is in its life cycle.
Functions§
- require_
objective_ value - Convenience: the objective values of a completed trial, or an error.