#[non_exhaustive]pub struct CustomTuningModel {
pub name: String,
pub display_name: String,
pub model_version: i64,
pub model_state: ModelState,
pub create_time: Option<Timestamp>,
pub training_start_time: Option<Timestamp>,
pub metrics: HashMap<String, f64>,
pub error_message: String,
/* private fields */
}search-tuning-service only.Expand description
Metadata that describes a custom tuned model.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringRequired. The fully qualified resource name of the model.
Format:
projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/customTuningModels/{custom_tuning_model}.
Model must be an alpha-numerical string with limit of 40 characters.
display_name: StringThe display name of the model.
model_version: i64The version of the model.
model_state: ModelStateThe state that the model is in (e.g.TRAINING or TRAINING_FAILED).
create_time: Option<Timestamp>Deprecated: Timestamp the Model was created at.
training_start_time: Option<Timestamp>Timestamp the model training was initiated.
metrics: HashMap<String, f64>The metrics of the trained model.
error_message: StringCurrently this is only populated if the model state is
INPUT_VALIDATION_FAILED.
Implementations§
Source§impl CustomTuningModel
impl CustomTuningModel
pub fn new() -> Self
Sourcepub fn set_display_name<T: Into<String>>(self, v: T) -> Self
pub fn set_display_name<T: Into<String>>(self, v: T) -> Self
Sets the value of display_name.
§Example
let x = CustomTuningModel::new().set_display_name("example");Sourcepub fn set_model_version<T: Into<i64>>(self, v: T) -> Self
pub fn set_model_version<T: Into<i64>>(self, v: T) -> Self
Sourcepub fn set_model_state<T: Into<ModelState>>(self, v: T) -> Self
pub fn set_model_state<T: Into<ModelState>>(self, v: T) -> Self
Sets the value of model_state.
§Example
use google_cloud_discoveryengine_v1::model::custom_tuning_model::ModelState;
let x0 = CustomTuningModel::new().set_model_state(ModelState::TrainingPaused);
let x1 = CustomTuningModel::new().set_model_state(ModelState::Training);
let x2 = CustomTuningModel::new().set_model_state(ModelState::TrainingComplete);Sourcepub fn set_create_time<T>(self, v: T) -> Self
👎Deprecated
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
use wkt::Timestamp;
let x = CustomTuningModel::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
👎Deprecated
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
§Example
use wkt::Timestamp;
let x = CustomTuningModel::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = CustomTuningModel::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_training_start_time<T>(self, v: T) -> Self
pub fn set_training_start_time<T>(self, v: T) -> Self
Sets the value of training_start_time.
§Example
use wkt::Timestamp;
let x = CustomTuningModel::new().set_training_start_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_training_start_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_training_start_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of training_start_time.
§Example
use wkt::Timestamp;
let x = CustomTuningModel::new().set_or_clear_training_start_time(Some(Timestamp::default()/* use setters */));
let x = CustomTuningModel::new().set_or_clear_training_start_time(None::<Timestamp>);Sourcepub fn set_metrics<T, K, V>(self, v: T) -> Self
pub fn set_metrics<T, K, V>(self, v: T) -> Self
Sourcepub fn set_error_message<T: Into<String>>(self, v: T) -> Self
pub fn set_error_message<T: Into<String>>(self, v: T) -> Self
Sets the value of error_message.
§Example
let x = CustomTuningModel::new().set_error_message("example");Trait Implementations§
Source§impl Clone for CustomTuningModel
impl Clone for CustomTuningModel
Source§fn clone(&self) -> CustomTuningModel
fn clone(&self) -> CustomTuningModel
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more