1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
* Windmill API
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.796.0
* Contact: contact@windmill.dev
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// ExperimentScore : One scorer's headline for one run: the two numbers a column reports, over that run's cells.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ExperimentScore {
#[serde(rename = "scorer_id")]
pub scorer_id: String,
/// What the column is called in the dataset that ran it, resolved server-side because a list of runs spanning datasets cannot hold every dataset's scorers to look it up.
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "kind")]
pub kind: Kind,
#[serde(rename = "mean", skip_serializing_if = "Option::is_none")]
pub mean: Option<f64>,
/// The share of scored cells at or above the column's threshold, for a column that has one. Absent where the column has no threshold and the mean is the whole headline.
#[serde(rename = "pass_rate", skip_serializing_if = "Option::is_none")]
pub pass_rate: Option<f64>,
#[serde(rename = "scored")]
pub scored: i32,
/// How many of the run's cells the column failed on. A column that failed on all of them has no number to report and is still one of the columns that ran.
#[serde(rename = "failed")]
pub failed: i32,
}
impl ExperimentScore {
/// One scorer's headline for one run: the two numbers a column reports, over that run's cells.
pub fn new(scorer_id: String, name: String, kind: Kind, scored: i32, failed: i32) -> ExperimentScore {
ExperimentScore {
scorer_id,
name,
kind,
mean: None,
pass_rate: None,
scored,
failed,
}
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Kind {
#[serde(rename = "agent")]
Agent,
#[serde(rename = "script")]
Script,
}
impl Default for Kind {
fn default() -> Kind {
Self::Agent
}
}