#[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,
/* private fields */
}Expand description
Tuning Spec for Supervised Tuning for first party models.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
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.
Implementations§
Source§impl SupervisedTuningSpec
impl SupervisedTuningSpec
pub fn new() -> Self
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.
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.
Sourcepub fn set_hyper_parameters<T: Into<Option<SupervisedHyperParameters>>>(
self,
v: T,
) -> Self
pub fn set_hyper_parameters<T: Into<Option<SupervisedHyperParameters>>>( self, v: T, ) -> Self
Sets the value of hyper_parameters.
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.
Trait Implementations§
Source§impl Clone for SupervisedTuningSpec
impl Clone for SupervisedTuningSpec
Source§fn clone(&self) -> SupervisedTuningSpec
fn clone(&self) -> SupervisedTuningSpec
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SupervisedTuningSpec
impl Debug for SupervisedTuningSpec
Source§impl Default for SupervisedTuningSpec
impl Default for SupervisedTuningSpec
Source§fn default() -> SupervisedTuningSpec
fn default() -> SupervisedTuningSpec
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SupervisedTuningSpecwhere
SupervisedTuningSpec: Default,
impl<'de> Deserialize<'de> for SupervisedTuningSpecwhere
SupervisedTuningSpec: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Message for SupervisedTuningSpec
impl Message for SupervisedTuningSpec
Source§impl PartialEq for SupervisedTuningSpec
impl PartialEq for SupervisedTuningSpec
Source§impl Serialize for SupervisedTuningSpec
impl Serialize for SupervisedTuningSpec
impl StructuralPartialEq for SupervisedTuningSpec
Auto Trait Implementations§
impl Freeze for SupervisedTuningSpec
impl RefUnwindSafe for SupervisedTuningSpec
impl Send for SupervisedTuningSpec
impl Sync for SupervisedTuningSpec
impl Unpin for SupervisedTuningSpec
impl UnwindSafe for SupervisedTuningSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more