#[non_exhaustive]pub struct Comparison {Show 14 fields
pub baseline_experiment: String,
pub candidate_experiment: String,
pub evaluators: Vec<EvaluatorDelta>,
pub regressions: Vec<CaseChange>,
pub fixes: Vec<CaseChange>,
pub only_in_baseline: Vec<String>,
pub only_in_candidate: Vec<String>,
pub baseline_tokens: Tokens,
pub candidate_tokens: Tokens,
pub tokens_delta: i64,
pub baseline_latency: LatencySummary,
pub candidate_latency: LatencySummary,
pub p50_delta_ms: f64,
pub p95_delta_ms: f64,
}Expand description
How a candidate run differs from a baseline run of the same experiment.
Built by Report::compare. Cases are matched by id. Trials that share
an id are pooled into one case, in both reports, so a duplicated id counts
once in the regression, fix and only-in lists.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.baseline_experiment: StringThe baseline’s experiment name.
candidate_experiment: StringThe candidate’s experiment name.
evaluators: Vec<EvaluatorDelta>Per evaluator: those of the baseline first, in its order, then those only the candidate has.
regressions: Vec<CaseChange>Cases that passed in the baseline and fail in the candidate, by id.
fixes: Vec<CaseChange>Cases that failed in the baseline and pass in the candidate, by id.
only_in_baseline: Vec<String>Case ids only the baseline has, sorted.
only_in_candidate: Vec<String>Case ids only the candidate has, sorted.
baseline_tokens: TokensThe baseline’s model tokens.
candidate_tokens: TokensThe candidate’s model tokens.
tokens_delta: i64candidate_tokens.total - baseline_tokens.total.
baseline_latency: LatencySummaryThe baseline’s run latencies.
candidate_latency: LatencySummaryThe candidate’s run latencies.
p50_delta_ms: f64The candidate’s p50 minus the baseline’s, in milliseconds.
p95_delta_ms: f64The candidate’s p95 minus the baseline’s, in milliseconds.
Implementations§
Source§impl Comparison
impl Comparison
Sourcepub fn to_markdown(&self) -> String
pub fn to_markdown(&self) -> String
The comparison as Markdown: a table per evaluator with the deltas, the
regressions and fixes, the cases only one report has, and the token and
latency deltas. A delta or value that does not apply is -.
Trait Implementations§
Source§impl Clone for Comparison
impl Clone for Comparison
Source§impl Debug for Comparison
impl Debug for Comparison
Source§impl<'de> Deserialize<'de> for Comparison
impl<'de> Deserialize<'de> for Comparison
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>,
Source§impl PartialEq for Comparison
impl PartialEq for Comparison
Source§impl Serialize for Comparison
impl Serialize for Comparison
impl StructuralPartialEq for Comparison
Auto Trait Implementations§
impl Forget for Comparison
impl Freeze for Comparisonwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<EvaluatorDelta>: Freeze,
PhantomData<CaseChange>: Freeze,
PhantomData<String>: Freeze,
impl Move for Comparison
impl RefUnwindSafe for Comparison
impl Send for Comparisonwhere
RawVecInner: Send,
impl Sync for Comparisonwhere
RawVecInner: Sync,
impl Unpin for Comparison
impl UnsafeUnpin for Comparisonwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<EvaluatorDelta>: UnsafeUnpin,
PhantomData<CaseChange>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for Comparisonwhere
RawVecInner: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> 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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more