Enum Decision
pub enum Decision {
Continue,
Prune,
Pause,
Fork {
parent: TrialId,
mutation: Assignment,
},
}Expand description
What should happen to a trial that just reported.
Variants§
Continue
Keep going.
Prune
Stop now. The trial’s last intermediate value becomes its objective
value (FrozenTrial::objective_value).
Pause
Suspend, keeping the checkpoint. The trial may be resumed later via
Command::ResumeTrial.
Declared in M1, executed from M4.0: the study loop transitions the
trial to TrialState::Paused — a
resumable, non-terminal state that keeps the trial’s checkpoint
reference — instead of completing, pruning or failing it.
Fork
Start a child of parent with mutated parameters — PBT’s
exploit-and-explore step.
Declared in M1, executed from M4.0. A fork does not stop the
trial that reported it (see stops_the_trial):
the study loop materializes a new trial whose
TrialTemplate carries the parent
reference and whose parameters are the parent’s with mutation applied,
and the child starts from the parent’s checkpoint reference. Only
scalar perturbations are allowed in mutation — a shape/categorical
parameter is resume-blocked because the parent checkpoint would not
load — and one that is not is refused loudly.
Fields
mutation: AssignmentParameters that differ from the parent’s.
Implementations§
§impl Decision
impl Decision
pub const fn stops_the_trial(&self) -> bool
pub const fn stops_the_trial(&self) -> bool
true if the trial should stop making progress right now.