Skip to main content

ExecutionConfig

Struct ExecutionConfig 

Source
#[non_exhaustive]
pub struct ExecutionConfig { pub samples_per_item: u32, pub stop_after_failures: Option<u32>, pub sample_concurrency: u32, pub max_observed_events: Option<usize>, pub record_answers: bool, }
Expand description

How the agent under test is exercised.

#[non_exhaustive]: this 0.1 grows a field whenever a run needs to say something new, and each one would be source-breaking for anybody constructing this with a struct literal — #[serde(default)] keeps a FILE readable and does nothing for Rust. Build it from Default and the with_* methods, which is what the next added field will not break.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§samples_per_item: u32

How many times each item runs end to end.

This is the only knob that measures model variance. Raising it makes a flaky item visible; raising JudgingConfig::votes_per_sample never will.

§stop_after_failures: Option<u32>

Stop the whole run after this many samples have failed their deterministic assertions. None runs the corpus to the end, which is what a nightly job wants; a pull-request gate may prefer to stop early.

§sample_concurrency: u32

How many samples may be in flight at once.

One — the default — runs the corpus strictly one sample at a time, which is what a reproducible in-memory run wants: the harness sees the samples in index order, and a scripted provider keyed on call order sees exactly the sequence it was written for.

Raising it is for a corpus against a real endpoint, where a hundred samples in series is hours of waiting on a network. What it changes is the execution order: samples start and finish interleaved, so a harness that shares anything between them — a counter, a queue of scripted answers, a rate limit — will see a different order every run. The report does not move: samples are still reported in index order, and the same set of results comes back whatever this is set to. Zero is read as one.

§max_observed_events: Option<usize>

How many of a turn’s events one observation may record before it stops and says so.

None — the default — reads the ledger to the end, paging the journal by its sequence cursor. A Some(limit) is a deliberate ceiling for a run where one item could commit an unbounded number of events, and it is never silent: an observation that hit it is marked truncated, and every assertion that reads the event list then fails loudly instead of passing over the half of the ledger nobody read.

§record_answers: bool

Keep the turn’s own words on each sample of the report.

Off by default, and the default is the careful one: the reply is the only model-authored prose a run produces, it is the one field that can carry whatever a person typed, and a report is a file that gets attached to things. A measurement does not need it — every assertion reads storage, and the judge is handed the text directly whether this is on or off.

Turn it on to CURATE. Writing the expectations of an item means deciding what the right reply would have been, and that cannot be done from a signature: two runs whose effects are identical can differ entirely in whether the assistant asked the question the turn needed. Reading them is how a corpus of scenes carried over from another engine gets its assertions.

Trait Implementations§

Source§

impl Clone for ExecutionConfig

Source§

fn clone(&self) -> Self

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 ExecutionConfig

Source§

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

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

impl Default for ExecutionConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ExecutionConfig

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 Eq for ExecutionConfig

Source§

impl PartialEq for ExecutionConfig

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl Serialize for ExecutionConfig

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

impl StructuralPartialEq for ExecutionConfig

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

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

Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> 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 = !

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

fn try_from(value: U) -> Result<T, !>

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