Enum StudyEvent
#[non_exhaustive]pub enum StudyEvent {
StudyCreated {
study: StudyId,
worker: WorkerId,
operation: OperationId,
},
StudyLoaded {
study: StudyId,
worker: WorkerId,
existing_trials: u64,
operation: OperationId,
},
SpaceGrowthDecided {
study: StudyId,
param: u32,
side: Side,
reason: GrowthReason,
operation: OperationId,
},
OptimizationStarted {
study: StudyId,
worker: WorkerId,
parallelism: usize,
operation: OperationId,
},
OptimizationFinished {
study: StudyId,
worker: WorkerId,
succeeded: bool,
operation: OperationId,
},
TrialStateChanged {
study: StudyId,
trial: TrialId,
number: TrialNumber,
worker: WorkerId,
from: TrialState,
to: TrialState,
operation: OperationId,
},
TrialAbandoned {
study: StudyId,
trial: TrialId,
number: TrialNumber,
worker: WorkerId,
operation: OperationId,
},
}Expand description
A committed lifecycle event emitted by a Study.
The event carries identifiers and state only. Parameter values, objective values, command arguments, storage paths, and checkpoint references are deliberately excluded so telemetry cannot leak experiment data by default.
§Correlation
Every variant carries an OperationId. Events emitted by one unit of
lifecycle work — the ask that starts a trial and the tell that finishes
it, the start and the end of one optimize run — share one id, which is
what lets a consumer reassemble a trace from an interleaved stream. The id
is unique only within a worker, so the correlation key is the pair
(worker, operation); see OperationId for why grouping by the
operation alone quietly produces wrong answers.
OperationId::NONE means this handle has no operation to attribute the
event to — a trial finalized by a handle that did not start it, for
instance. It is an honest gap, and consumers must treat it as “uncorrelated”
rather than as an operation in its own right.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
StudyCreated
A new study was persisted and its runtime seams were initialized.
Fields
operation: OperationIdThe create call this event belongs to.
StudyLoaded
An existing study was loaded and its runtime seams were restored.
Fields
operation: OperationIdThe load call this event belongs to.
SpaceGrowthDecided
The growth rule took a decision for one side of one open parameter
(the open-search-spaces plan §13.2) — a movement (Crowding,
VetoRolledBack) or a brake, one variant for all seven
GrowthReasons, so a live consumer can tell “not crowded” from
“crowded and braked”.
Carries an index, not a name, and no bounds: this enum holds
identifiers and state only (the privacy contract above), and a bound
is unmistakably experiment data. param indexes the name-sorted
parameter list of the widened space — the only ordering defined for
both declared and define-by-run spaces — and each trial’s own
recorded distributions remain the authoritative range record.
Fields
reason: GrowthReasonWhat was decided.
operation: OperationIdThe ask this decision was taken under.
OptimizationStarted
An optimize run started.
Fields
operation: OperationIdThe run this event belongs to; shared with its
OptimizationFinished.
OptimizationFinished
An optimize run returned.
Fields
operation: OperationIdThe run this event belongs to; shared with its
OptimizationStarted.
TrialStateChanged
A trial state transition committed successfully.
Fields
number: TrialNumberPer-study trial number used by deterministic sampling.
from: TrialStateState observed by the successful compare-and-swap.
to: TrialStateNewly committed state.
operation: OperationIdThe unit of work this transition belongs to: the start and the terminal transition of one in-flight trial share it.
TrialAbandoned
A trial failed before a worker could take ownership of it.
Storage keeps the trial in Waiting and records its error, preserving
numbering while keeping it invisible to samplers.
Fields
number: TrialNumberPer-study trial number used by deterministic sampling.
operation: OperationIdThe ask whose failure abandoned the reservation.
Trait Implementations§
§impl Clone for StudyEvent
impl Clone for StudyEvent
§fn clone(&self) -> StudyEvent
fn clone(&self) -> StudyEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more