Skip to main content

windmill_api/models/
experiment_results_200_response.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.801.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ExperimentResults200Response {
16    #[serde(rename = "experiment")]
17    pub experiment: Box<models::EvalExperiment>,
18    #[serde(rename = "baseline", skip_serializing_if = "Option::is_none")]
19    pub baseline: Option<Box<models::EvalExperiment>>,
20    /// The columns, which belong to the dataset rather than the experiment.
21    #[serde(rename = "scorers")]
22    pub scorers: Vec<models::Scorer>,
23    #[serde(rename = "rows")]
24    pub rows: Vec<models::ExperimentRow>,
25    #[serde(rename = "means")]
26    pub means: Vec<models::ScorerMean>,
27    /// Cells scoring lower than the baseline, across every column.
28    #[serde(rename = "regressed")]
29    pub regressed: i32,
30    /// The version the subject is on now. A row that ran against an earlier one describes an agent that no longer exists. 
31    #[serde(rename = "subject_current_version", skip_serializing_if = "Option::is_none")]
32    pub subject_current_version: Option<i64>,
33    /// What the agent hashes to as deployed. A run of unsaved edits carrying this hash ran exactly what is deployed now — the edits were saved — so it is a run of that version rather than of edits. 
34    #[serde(rename = "subject_deployed_hash", skip_serializing_if = "Option::is_none")]
35    pub subject_deployed_hash: Option<String>,
36}
37
38impl ExperimentResults200Response {
39    pub fn new(experiment: models::EvalExperiment, scorers: Vec<models::Scorer>, rows: Vec<models::ExperimentRow>, means: Vec<models::ScorerMean>, regressed: i32) -> ExperimentResults200Response {
40        ExperimentResults200Response {
41            experiment: Box::new(experiment),
42            baseline: None,
43            scorers,
44            rows,
45            means,
46            regressed,
47            subject_current_version: None,
48            subject_deployed_hash: None,
49        }
50    }
51}
52