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
/*
* 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};
/// EvalExperiment : One run of a dataset: written once when the dataset is run, and only ever read afterwards. The case set it executed is returned by the results endpoint, not here: a listing would otherwise send the whole dataset back once per experiment.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct EvalExperiment {
#[serde(rename = "id")]
pub id: uuid::Uuid,
#[serde(rename = "dataset")]
pub dataset: String,
#[serde(rename = "subject")]
pub subject: Box<models::EvalSubject>,
/// This agent's nth run of this dataset, allocated once and never reused. What a run is called. Numbered per agent rather than per subject kind: runs of what is deployed and runs of its draft are the same agent's history.
#[serde(rename = "run_number")]
pub run_number: i32,
/// The flow executing the run: one job holding every case and its scores.
#[serde(rename = "run_job_id")]
pub run_job_id: uuid::Uuid,
#[serde(rename = "case_count")]
pub case_count: i32,
/// What the run scored, one entry per scorer that produced a number. Carried on the run itself so a list of runs can say what each one scored without reading every cell of every one of them. Empty on a run whose scores have not been read yet.
#[serde(rename = "scores", skip_serializing_if = "Option::is_none")]
pub scores: Option<Vec<models::ExperimentScore>>,
/// Whether the flow executing this run is still going. What makes a list of runs worth watching rather than worth reloading.
#[serde(rename = "running", skip_serializing_if = "Option::is_none")]
pub running: Option<bool>,
#[serde(rename = "created_at")]
pub created_at: String,
#[serde(rename = "created_by")]
pub created_by: String,
}
impl EvalExperiment {
/// One run of a dataset: written once when the dataset is run, and only ever read afterwards. The case set it executed is returned by the results endpoint, not here: a listing would otherwise send the whole dataset back once per experiment.
pub fn new(id: uuid::Uuid, dataset: String, subject: models::EvalSubject, run_number: i32, run_job_id: uuid::Uuid, case_count: i32, created_at: String, created_by: String) -> EvalExperiment {
EvalExperiment {
id,
dataset,
subject: Box::new(subject),
run_number,
run_job_id,
case_count,
scores: None,
running: None,
created_at,
created_by,
}
}
}