#[non_exhaustive]pub struct SupervisedTuningSpec {
pub training_dataset_uri: String,
pub validation_dataset_uri: String,
pub hyper_parameters: Option<SupervisedHyperParameters>,
pub export_last_checkpoint_only: bool,
pub evaluation_config: Option<EvaluationConfig>,
/* private fields */
}gen-ai-tuning-service only.Expand description
Tuning Spec for Supervised Tuning for first party models.
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.training_dataset_uri: StringRequired. Cloud Storage path to file containing training dataset for tuning. The dataset must be formatted as a JSONL file.
validation_dataset_uri: StringOptional. Cloud Storage path to file containing validation dataset for tuning. The dataset must be formatted as a JSONL file.
hyper_parameters: Option<SupervisedHyperParameters>Optional. Hyperparameters for SFT.
export_last_checkpoint_only: boolOptional. If set to true, disable intermediate checkpoints for SFT and only the last checkpoint will be exported. Otherwise, enable intermediate checkpoints for SFT. Default is false.
evaluation_config: Option<EvaluationConfig>Optional. Evaluation Config for Tuning Job.
Implementations§
Source§impl SupervisedTuningSpec
impl SupervisedTuningSpec
Sourcepub fn set_training_dataset_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_training_dataset_uri<T: Into<String>>(self, v: T) -> Self
Sets the value of training_dataset_uri.
§Example
let x = SupervisedTuningSpec::new().set_training_dataset_uri("example");Sourcepub fn set_validation_dataset_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_validation_dataset_uri<T: Into<String>>(self, v: T) -> Self
Sets the value of validation_dataset_uri.
§Example
let x = SupervisedTuningSpec::new().set_validation_dataset_uri("example");Sourcepub fn set_hyper_parameters<T>(self, v: T) -> Selfwhere
T: Into<SupervisedHyperParameters>,
pub fn set_hyper_parameters<T>(self, v: T) -> Selfwhere
T: Into<SupervisedHyperParameters>,
Sets the value of hyper_parameters.
§Example
use google_cloud_aiplatform_v1::model::SupervisedHyperParameters;
let x = SupervisedTuningSpec::new().set_hyper_parameters(SupervisedHyperParameters::default()/* use setters */);Sourcepub fn set_or_clear_hyper_parameters<T>(self, v: Option<T>) -> Selfwhere
T: Into<SupervisedHyperParameters>,
pub fn set_or_clear_hyper_parameters<T>(self, v: Option<T>) -> Selfwhere
T: Into<SupervisedHyperParameters>,
Sets or clears the value of hyper_parameters.
§Example
use google_cloud_aiplatform_v1::model::SupervisedHyperParameters;
let x = SupervisedTuningSpec::new().set_or_clear_hyper_parameters(Some(SupervisedHyperParameters::default()/* use setters */));
let x = SupervisedTuningSpec::new().set_or_clear_hyper_parameters(None::<SupervisedHyperParameters>);Sourcepub fn set_export_last_checkpoint_only<T: Into<bool>>(self, v: T) -> Self
pub fn set_export_last_checkpoint_only<T: Into<bool>>(self, v: T) -> Self
Sets the value of export_last_checkpoint_only.
§Example
let x = SupervisedTuningSpec::new().set_export_last_checkpoint_only(true);Sourcepub fn set_evaluation_config<T>(self, v: T) -> Selfwhere
T: Into<EvaluationConfig>,
pub fn set_evaluation_config<T>(self, v: T) -> Selfwhere
T: Into<EvaluationConfig>,
Sets the value of evaluation_config.
§Example
use google_cloud_aiplatform_v1::model::EvaluationConfig;
let x = SupervisedTuningSpec::new().set_evaluation_config(EvaluationConfig::default()/* use setters */);Sourcepub fn set_or_clear_evaluation_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<EvaluationConfig>,
pub fn set_or_clear_evaluation_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<EvaluationConfig>,
Sets or clears the value of evaluation_config.
§Example
use google_cloud_aiplatform_v1::model::EvaluationConfig;
let x = SupervisedTuningSpec::new().set_or_clear_evaluation_config(Some(EvaluationConfig::default()/* use setters */));
let x = SupervisedTuningSpec::new().set_or_clear_evaluation_config(None::<EvaluationConfig>);Trait Implementations§
Source§impl Clone for SupervisedTuningSpec
impl Clone for SupervisedTuningSpec
Source§fn clone(&self) -> SupervisedTuningSpec
fn clone(&self) -> SupervisedTuningSpec
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more