Skip to main content

Measurement

Struct Measurement 

Source
pub struct Measurement {
Show 14 fields pub measured_at: String, pub model: String, pub disposition: String, pub reason: String, pub selection: TallyRecord, pub holdout: TallyRecord, pub work_baseline: u64, pub work_candidate: u64, pub episodes: Vec<String>, pub holdout_episodes: Vec<String>, pub seed: u64, pub diverged: Vec<String>, pub replay_caveats: Vec<String>, pub skipped: usize,
}
Expand description

What the counterfactual replay measured, kept whole on the candidate.

Fields§

§measured_at: String§model: String§disposition: String

accept | propose | reject — the gate’s own verdict, which is not the candidate’s status: a propose verdict stages for a human.

§reason: String

The gate’s reason, empty for accept.

§selection: TallyRecord§holdout: TallyRecord§work_baseline: u64§work_candidate: u64§episodes: Vec<String>

Session ids paired and judged, selection slice first.

§holdout_episodes: Vec<String>

Which of those were the holdout, and the seed the uniform draw used.

Recorded rather than recomputed, because it can no longer be recomputed. The split used to be is_holdout(id, holdout_in) — a pure function of the episode id, so any later reader could reconstruct which episodes confirmed a result. Drawing uniformly from a pool makes the split depend on the corpus as it stood at measurement time, which is gone the moment another session is written. Without these two fields “which episodes was this confirmed on” stops being answerable, which is the property the drawing was introduced to protect: a sample nobody can redraw is a sample nobody can check.

§seed: u64§diverged: Vec<String>

Sessions dropped because an arm left the recording — a divergent replay’s stats describe a truncated run, and scoring one would let a behaviour-visible change be graded on the fraction it tracked. Bare ids, and they stay that way: episodes/holdout_episodes’s own contract (a sample nobody can redraw is one nobody can check) holds here too, and anything resolving an entry back to a session path must not have to parse annotation out of it first.

§replay_caveats: Vec<String>

What the replay was compromising on, per episode that carried a compromise — “id — attached N times; replayed under the first config” — whatever became of the episode, skipped ones included (the caveat is computed at prepare time, before any arm drives): a dropped one’s divergence may say more about the compromise than about the change, and a cleanly paired one feeds the tally that gates acceptance, which is the more consequential place for the decider reading mecha harness show to know the replay was compromising. Beside diverged rather than folded into it, so the ids stay joinable.

§skipped: usize

Sessions that could not be replayed at all (unreadable, no recorded calls, tool surface moved). Never evidence for either arm.

Implementations§

Source§

impl Measurement

Source

pub fn record( judgement: &Judgement, model: &str, measured_at: String, drawn: Drawn, ) -> Measurement

Trait Implementations§

Source§

impl Clone for Measurement

Source§

fn clone(&self) -> Measurement

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
Source§

impl Debug for Measurement

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Measurement

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Measurement

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

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
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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

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

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

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.

Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
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 = !

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.
Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

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