Struct StudySnapshot
pub struct StudySnapshot { /* private fields */ }Expand description
One immutable, presentation-neutral study observation.
Unlike the sampler-facing StudyView, every trial in this snapshot has
its recorded constraints and tune replicate fan attached. Full fans,
open-space policies, pending finalizations, and the backend’s consistency
guarantee stay alongside that view. Exact built-in backends (Memory, Journal,
and SQLite), and a remote wrapper over one of them, batch the requested
components through one storage snapshot read. A source-compatible custom
backend uses the default
Storage::read_snapshot fallback:
it is explicitly SnapshotConsistency::BestEffort and may perform one
bounded second pass when trial parameters reveal policy names missing from
the immutable configuration. The type deliberately does not implement
Deref: callers choose the canonical read explicitly. Raw storage snapshots
keep explicitly requested scopes verbatim, including foreign study scopes;
this typed boundary filters foreign trials, side state, and outbox records
before hydration.
Implementations§
§impl StudySnapshot
impl StudySnapshot
pub const fn view(&self) -> &StudyView
pub const fn view(&self) -> &StudyView
The hydrated trial view used by ranking and presentation consumers.
pub fn best_trial(&self) -> Option<&FrozenTrial>
pub fn best_trial(&self) -> Option<&FrozenTrial>
The canonical single-objective winner, feasibility first.
pub fn pareto_front(&self) -> Vec<&FrozenTrial>
pub fn pareto_front(&self) -> Vec<&FrozenTrial>
The canonical constrained Pareto front in trial-number order.
Single-objective snapshots use the scalar form of the canonical
relation: one ordered scan retains every trial tied with the best
comparable quality. The raw StudyView keeps its generic
multi-objective implementation unchanged.
pub fn nadir_point(&self) -> Option<Vec<f64>>
pub fn nadir_point(&self) -> Option<Vec<f64>>
The canonical nadir point of comparable trials.
pub fn hypervolume(&self, reference: &[f64]) -> Result<f64>
pub fn hypervolume(&self, reference: &[f64]) -> Result<f64>
Hypervolume of the canonical feasible front.
§Errors
Everything crate::pareto::hypervolume reports, including an
unsupported objective dimension.
pub fn trial_fan(&self, trial: TrialId) -> Option<&ReplicateFan>
pub fn trial_fan(&self, trial: TrialId) -> Option<&ReplicateFan>
One trial’s full tune/test replicate fan, if recorded.
pub fn fans(&self) -> impl Iterator<Item = (TrialId, &ReplicateFan)>
pub fn fans(&self) -> impl Iterator<Item = (TrialId, &ReplicateFan)>
Every hydrated fan, in trial-id order.
pub fn policy_for(&self, name: &str) -> Option<&Open>
pub fn policy_for(&self, name: &str) -> Option<&Open>
One persisted open-space policy, if recorded.
pub const fn policies(&self) -> &SpacePolicy
pub const fn policies(&self) -> &SpacePolicy
All persisted open-space policies.
pub fn pending_finalizations(&self) -> &[OutboxRecord]
pub fn pending_finalizations(&self) -> &[OutboxRecord]
Pending terminal finalizations, in durable key order.
pub const fn consistency(&self) -> SnapshotConsistency
pub const fn consistency(&self) -> SnapshotConsistency
The backend consistency guarantee for this observation.
Trait Implementations§
§impl Clone for StudySnapshot
impl Clone for StudySnapshot
§fn clone(&self) -> StudySnapshot
fn clone(&self) -> StudySnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more