pub struct EvalComparison {
pub cases: Vec<CaseComparison>,
}Expand description
Comparison of two eval runs for A/B testing and regression detection.
Fields§
§cases: Vec<CaseComparison>Per-case comparison results.
Implementations§
Source§impl EvalComparison
impl EvalComparison
Sourcepub fn compare(baseline: &[EvalResult], candidate: &[EvalResult]) -> Self
pub fn compare(baseline: &[EvalResult], candidate: &[EvalResult]) -> Self
Compare baseline and candidate eval results.
Matches results by case_name. Cases present in only one run are skipped.
Sourcepub fn baseline_wins(&self) -> usize
pub fn baseline_wins(&self) -> usize
Number of cases where baseline scored higher.
Sourcepub fn candidate_wins(&self) -> usize
pub fn candidate_wins(&self) -> usize
Number of cases where candidate scored higher.
Sourcepub fn has_regressions(&self) -> bool
pub fn has_regressions(&self) -> bool
Whether any case regressed from baseline to candidate.
Sourcepub fn regressions(&self) -> Vec<&str>
pub fn regressions(&self) -> Vec<&str>
Names of cases where candidate scored lower than baseline.
Trait Implementations§
Source§impl Clone for EvalComparison
impl Clone for EvalComparison
Source§fn clone(&self) -> EvalComparison
fn clone(&self) -> EvalComparison
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EvalComparison
impl Debug for EvalComparison
Source§impl<'de> Deserialize<'de> for EvalComparison
impl<'de> Deserialize<'de> for EvalComparison
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 Display for EvalComparison
impl Display for EvalComparison
Auto Trait Implementations§
impl Freeze for EvalComparison
impl RefUnwindSafe for EvalComparison
impl Send for EvalComparison
impl Sync for EvalComparison
impl Unpin for EvalComparison
impl UnsafeUnpin for EvalComparison
impl UnwindSafe for EvalComparison
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.