Skip to main content

EvaluatorConfig

Struct EvaluatorConfig 

Source
pub struct EvaluatorConfig {
Show 17 fields pub schema: String, pub adapter: ConfigAdapter, pub label_interpretation: String, pub agreement: Agreement, pub probability_step: Option<String>, pub reliability_bins: Vec<Decimal>, pub subgroups: Vec<String>, pub latency_quantiles: Vec<Decimal>, pub cost_units_comparable: bool, pub metrics: Vec<MetricFormula>, pub gates: Vec<Gate>, pub temperature_grid: Vec<Decimal>, pub scorers: Option<Vec<ScorerDescriptor>>, pub rubric_metrics: Option<Vec<RubricMetric>>, pub human_scales: Option<Vec<HumanScale>>, pub agreements: Option<Vec<AgreementDecl>>, pub origin: Option<Vec<OriginFamily>>,
}

Fields§

§schema: String§adapter: ConfigAdapter§label_interpretation: String

What a label means, in words.

§agreement: Agreement§probability_step: Option<String>

The step whose probability vector log loss, Brier and reliability score; none when the task has no probability to score.

§reliability_bins: Vec<Decimal>

Reliability bin boundaries: strictly increasing from 0 to 1.

§subgroups: Vec<String>

Declared subgroups, reported besides the whole cohort.

§latency_quantiles: Vec<Decimal>

Latency quantiles in (0, 1], strictly increasing (nearest rank).

§cost_units_comparable: bool

Whether every backend’s cost units may be added together.

§metrics: Vec<MetricFormula>

Every metric this configuration reports, with its formula in words.

§gates: Vec<Gate>§temperature_grid: Vec<Decimal>

Candidate temperatures for fitting: strictly increasing, in (0, 1000], at most 4096; empty when nothing is fitted.

§scorers: Option<Vec<ScorerDescriptor>>

Version 3 only, as are the four members below (spec 041, 3.6 to 3.8 and 3.5).

§rubric_metrics: Option<Vec<RubricMetric>>§human_scales: Option<Vec<HumanScale>>§agreements: Option<Vec<AgreementDecl>>§origin: Option<Vec<OriginFamily>>

Implementations§

Source§

impl EvaluatorConfig

Source

pub fn bound_rules(&self) -> Option<&ContentDigest>

The rules digest a gate may compare: bound in version 2, otherwise none (version 1 rules are unbound, spec 014 3.2.3).

Source

pub fn declarations(&self) -> Option<Declarations<'_>>

The version 3 declarations; none in versions 1 and 2.

Source

pub fn check(&self) -> Result<(), ConfigError>

Trait Implementations§

Source§

impl Clone for EvaluatorConfig

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 EvaluatorConfig

Source§

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

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

impl<'de> Deserialize<'de> for EvaluatorConfig

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 Document for EvaluatorConfig

Either version parses; SCHEMA names version 1 only because the trait holds one constant. The identity is tagged with the document’s own schema, so a version 1 identity is what it always was.

Source§

const SCHEMA: &'static str = EVALUATOR_CONFIG

The schema string this document carries (spec 002, 3.2.1).
Source§

const LIMITS: ParseLimits = REPLAY_V1

The limit set its bytes are scanned against (spec 002, 3.2.5).
Source§

fn schema(&self) -> &str

The value of the document’s own schema field.
Source§

fn parse(bytes: &[u8]) -> Result<Self, DocumentError>

Scan, deserialize and check the schema string.
Source§

fn record_digest(&self) -> Result<ContentDigest, CanonicalError>

sha256(SCHEMA || 0x00 || record canonical bytes) (spec 004, 3.1.6). Equal to the identity of an identified document.
Source§

fn canonical(&self) -> Result<Vec<u8>, CanonicalError>

The canonical bytes (spec 002, 3.3.1).
Source§

fn record_canonical(&self) -> Result<Vec<u8>, CanonicalError>
where Self: PartialEq,

The record canonical bytes (spec 004, 5.6): the canonical bytes, with finite fractional numbers written in shortest round-trip form.
Source§

impl Eq for EvaluatorConfig

Source§

impl Identified for EvaluatorConfig

Source§

type Id = EvaluatorConfigId

Source§

fn id(&self) -> Result<EvaluatorConfigId, CanonicalError>

sha256(SCHEMA || 0x00 || canonical bytes) (spec 002, 3.3.2).
Source§

impl PartialEq for EvaluatorConfig

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 EvaluatorConfig

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 EvaluatorConfig

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> DynClone for T
where T: Clone,

Source§

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

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> Same for T

Source§

type Output = T

Should always be Self
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.