Skip to main content

mistral_openapi_client/models/
classifier_training_parameters_in.rs

1/*
2 * Mistral AI API
3 *
4 * Our Chat Completion and Embeddings APIs specification. Create your account on [La Plateforme](https://console.mistral.ai) to get access and read the [docs](https://docs.mistral.ai) to learn how to use it.
5 *
6 * The version of the OpenAPI document: 1.0.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// ClassifierTrainingParametersIn : The fine-tuning hyperparameter settings used in a classifier fine-tune job.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ClassifierTrainingParametersIn {
17    #[serde(rename = "training_steps", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
18    pub training_steps: Option<Option<i32>>,
19    /// A parameter describing how much to adjust the pre-trained model's weights in response to the estimated error each time the weights are updated during the fine-tuning process.
20    #[serde(rename = "learning_rate", skip_serializing_if = "Option::is_none")]
21    pub learning_rate: Option<f64>,
22    #[serde(rename = "weight_decay", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
23    pub weight_decay: Option<Option<f64>>,
24    #[serde(rename = "warmup_fraction", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
25    pub warmup_fraction: Option<Option<f64>>,
26    #[serde(rename = "epochs", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
27    pub epochs: Option<Option<f64>>,
28    #[serde(rename = "seq_len", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
29    pub seq_len: Option<Option<i32>>,
30}
31
32impl ClassifierTrainingParametersIn {
33    /// The fine-tuning hyperparameter settings used in a classifier fine-tune job.
34    pub fn new() -> ClassifierTrainingParametersIn {
35        ClassifierTrainingParametersIn {
36            training_steps: None,
37            learning_rate: None,
38            weight_decay: None,
39            warmup_fraction: None,
40            epochs: None,
41            seq_len: None,
42        }
43    }
44}
45