Skip to main content

StopGates

Struct StopGates 

Source
pub struct StopGates {
    pub max_iterations: u32,
    pub max_revisions_per_node: u32,
    pub max_wall_clock_seconds: Option<u64>,
    pub max_tokens: Option<u64>,
    pub max_cost_usd: Option<f64>,
    pub no_progress_iterations: u32,
    pub no_progress_iterations_randomness: Option<u32>,
    pub stop_on_overall_success: bool,
}

Fields§

§max_iterations: u32

Hard ceiling on whole-loop iterations.

§max_revisions_per_node: u32

Per-node revision ceiling. A node that has been dispatched this many times without its goals being satisfied stops being dispatched, so one stuck node cannot burn the whole iteration budget.

§max_wall_clock_seconds: Option<u64>

Wall-clock budget for the whole run.

§max_tokens: Option<u64>

Token budget for the whole run, summed across providers.

§max_cost_usd: Option<f64>

Currency budget for the whole run.

§no_progress_iterations: u32

Halt when this many consecutive iterations produce no measurable change. Jidoka: stop the line rather than spin.

§no_progress_iterations_randomness: Option<u32>

Perturb the run after this many stalled iterations, instead of waiting to halt at no_progress_iterations.

Must be strictly less than no_progress_iterations: the point is to try something different before giving up, and a threshold at or past the halt point never fires. Leave it unset to halt without ever varying — perturbation costs a provider call and changes what the loop does, so it is opt-in.

§stop_on_overall_success: bool

Stop as soon as every overall success scenario is met.

Trait Implementations§

Source§

impl Clone for StopGates

Source§

fn clone(&self) -> StopGates

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 StopGates

Source§

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

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

impl Default for StopGates

Source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for StopGates

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 StopGates

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, 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> 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.