#[non_exhaustive]pub struct Baseline {
pub path: String,
pub workflow_fingerprint: String,
pub metrics: IndexMap<String, f64>,
pub pass_rates: IndexMap<String, f64>,
pub judges: HashMap<String, String>,
}Expand description
What a comparison needs from a report: read from a results file as plain JSON (any schema version), so the comparison does not deserialize whole reports and their run events.
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.path: StringWhere it was read from.
workflow_fingerprint: String§metrics: IndexMap<String, f64>Mean score per metric (metrics with counted results only).
pass_rates: IndexMap<String, f64>Pass rate per test id over its trials, in suite order.
judges: HashMap<String, String>Fingerprint per judge workflow.
Implementations§
Source§impl Baseline
impl Baseline
Sourcepub fn load(path: &Path) -> Result<Self, EvalError>
pub fn load(path: &Path) -> Result<Self, EvalError>
Read an --output results file (report schema version 1 or 2).
Sourcepub fn from_json(path: &str, report: &Json) -> Result<Self, String>
pub fn from_json(path: &str, report: &Json) -> Result<Self, String>
Extract a baseline from a report’s JSON.
Sourcepub fn of(report: &EvalReport, path: &str) -> Self
pub fn of(report: &EvalReport, path: &str) -> Self
The same view of a report in memory.
Trait Implementations§
impl StructuralPartialEq for Baseline
Auto Trait Implementations§
impl Forget for Baseline
impl Freeze for Baseline
impl Move for Baseline
impl RefUnwindSafe for Baseline
impl Send for Baseline
impl Sync for Baseline
impl Unpin for Baseline
impl UnsafeUnpin for Baseline
impl UnwindSafe for Baseline
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