pub struct EvalReport {
pub suite: String,
pub generated_at: DateTime<Utc>,
pub config: EvalConfig,
pub items: Vec<ItemReport>,
}Expand description
One whole run.
Fields§
§suite: StringThe suite that ran.
generated_at: DateTime<Utc>When the run finished.
config: EvalConfigThe configuration it ran under, so a reader can see how many samples and how many votes produced these numbers.
items: Vec<ItemReport>Every item, in suite order.
Implementations§
Source§impl EvalReport
impl EvalReport
Sourcepub fn new(
suite: impl Into<String>,
generated_at: DateTime<Utc>,
config: EvalConfig,
items: Vec<ItemReport>,
) -> Self
pub fn new( suite: impl Into<String>, generated_at: DateTime<Utc>, config: EvalConfig, items: Vec<ItemReport>, ) -> Self
Builds a report.
Sourcepub fn item(&self, id: &ItemId) -> Option<&ItemReport>
pub fn item(&self, id: &ItemId) -> Option<&ItemReport>
One item by identifier.
Sourcepub fn total_samples(&self) -> usize
pub fn total_samples(&self) -> usize
Total samples across the run.
Sourcepub fn samples_passed(&self) -> usize
pub fn samples_passed(&self) -> usize
Samples that satisfied every deterministic expectation.
Sourcepub fn deterministic_pass_rate(&self) -> f64
pub fn deterministic_pass_rate(&self) -> f64
Fraction of samples that satisfied every deterministic expectation.
Sourcepub fn flaky_items(&self) -> Vec<&ItemReport>
pub fn flaky_items(&self) -> Vec<&ItemReport>
Items whose samples disagreed with each other.
Sourcepub fn reliability(&self) -> Reliability
pub fn reliability(&self) -> Reliability
The dashboard of §26.3.
Sourcepub fn judge_summaries(&self) -> Vec<CriterionSummary>
pub fn judge_summaries(&self) -> Vec<CriterionSummary>
The judge’s numbers across the whole suite.
Sourcepub fn to_json(&self) -> Result<String, ReportError>
pub fn to_json(&self) -> Result<String, ReportError>
The machine-readable form, for a continuous integration gate to archive
and for crate::baseline to read back.
§Errors
ReportError::Serialize when the report cannot be rendered as JSON.
Sourcepub fn from_json(source: &str) -> Result<Self, ReportError>
pub fn from_json(source: &str) -> Result<Self, ReportError>
Reads a report back from its machine-readable form.
§Errors
ReportError::Deserialize when the document is not a report.
Sourcepub fn task_accuracy(&self) -> Option<String>
pub fn task_accuracy(&self) -> Option<String>
Each understanding task’s accuracy over the samples whose item says what it
expects of that task, as segment 40/46 · route 30/31; None when no item
says.
Sourcepub fn discard_codes(&self) -> String
pub fn discard_codes(&self) -> String
The discarded-answer codes of the whole run, commonest first, rendered
as code×n.
Which code it is decides what to do about it, and the two that this
corpus produces want opposite answers: evidence means the model cited
something the turn does not contain, which is a reading the grounding
rule caught, while schema_violation means the document was the wrong
shape, which is a schema the model cannot satisfy. Reporting only a rate
would leave the reader unable to tell them apart.
Sourcepub fn gate(&self, thresholds: &GateThresholds) -> GateOutcome
pub fn gate(&self, thresholds: &GateThresholds) -> GateOutcome
Applies a gate’s thresholds.