Skip to main content

windmill_api/models/
scorer_mean.rs

1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.796.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// ScorerMean : A column's summary. There is no single number for a dataset: averaging a judge with an exact match would invent one. 
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ScorerMean {
17    #[serde(rename = "scorer_id")]
18    pub scorer_id: String,
19    #[serde(rename = "mean", skip_serializing_if = "Option::is_none")]
20    pub mean: Option<f64>,
21    #[serde(rename = "baseline_mean", skip_serializing_if = "Option::is_none")]
22    pub baseline_mean: Option<f64>,
23    /// The share of scored cells that passed, for a column with a threshold. Reported beside the mean rather than instead of it: a pass rate says how many cases are good enough, a mean says by how much, and neither answers the other's question. 
24    #[serde(rename = "pass_rate", skip_serializing_if = "Option::is_none")]
25    pub pass_rate: Option<f64>,
26    #[serde(rename = "baseline_pass_rate", skip_serializing_if = "Option::is_none")]
27    pub baseline_pass_rate: Option<f64>,
28    #[serde(rename = "scored")]
29    pub scored: i32,
30    /// Cells the baseline has no score for, so a column the baseline never ran shows as unscored rather than as a spurious difference.
31    #[serde(rename = "missing_in_baseline")]
32    pub missing_in_baseline: i32,
33    #[serde(rename = "definition_changed")]
34    pub definition_changed: bool,
35}
36
37impl ScorerMean {
38    /// A column's summary. There is no single number for a dataset: averaging a judge with an exact match would invent one. 
39    pub fn new(scorer_id: String, scored: i32, missing_in_baseline: i32, definition_changed: bool) -> ScorerMean {
40        ScorerMean {
41            scorer_id,
42            mean: None,
43            baseline_mean: None,
44            pass_rate: None,
45            baseline_pass_rate: None,
46            scored,
47            missing_in_baseline,
48            definition_changed,
49        }
50    }
51}
52