Skip to main content

StudyEvent

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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

StudyCreated

A new study was persisted and its runtime seams were initialized.

Fields

§study: StudyId

Storage-local study identity.

§worker: WorkerId

Identity of the handle that created it.

§operation: OperationId

The create call this event belongs to.

§

StudyLoaded

An existing study was loaded and its runtime seams were restored.

Fields

§study: StudyId

Storage-local study identity.

§worker: WorkerId

Identity of the handle that loaded it.

§existing_trials: u64

Trials already present when the handle was assembled.

§operation: OperationId

The 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

§study: StudyId

Storage-local study identity.

§param: u32

Index into the name-sorted parameter list of the widened space.

§side: Side

The side the decision concerns.

§reason: GrowthReason

What was decided.

§operation: OperationId

The ask this decision was taken under.

§

OptimizationStarted

An optimize run started.

Fields

§study: StudyId

Storage-local study identity.

§worker: WorkerId

Identity of the driving handle.

§parallelism: usize

Maximum evaluations this handle may run concurrently.

§operation: OperationId

The run this event belongs to; shared with its OptimizationFinished.

§

OptimizationFinished

An optimize run returned.

Fields

§study: StudyId

Storage-local study identity.

§worker: WorkerId

Identity of the driving handle.

§succeeded: bool

Whether the run returned Ok.

§operation: OperationId

The run this event belongs to; shared with its OptimizationStarted.

§

TrialStateChanged

A trial state transition committed successfully.

Fields

§study: StudyId

Storage-local study identity.

§trial: TrialId

Storage-global trial identity.

§number: TrialNumber

Per-study trial number used by deterministic sampling.

§worker: WorkerId

Identity of the handle that requested the transition.

§from: TrialState

State observed by the successful compare-and-swap.

§to: TrialState

Newly committed state.

§operation: OperationId

The 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

§study: StudyId

Storage-local study identity.

§trial: TrialId

Storage-global trial identity.

§number: TrialNumber

Per-study trial number used by deterministic sampling.

§worker: WorkerId

Identity of the handle that abandoned the trial.

§operation: OperationId

The ask whose failure abandoned the reservation.

Trait Implementations§

§

impl Clone for StudyEvent

§

fn clone(&self) -> StudyEvent

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Copy for StudyEvent

§

impl Debug for StudyEvent

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
§

impl Eq for StudyEvent

§

impl PartialEq for StudyEvent

§

fn eq(&self, other: &StudyEvent) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
§

impl StructuralPartialEq for StudyEvent

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more