VanillaTrainingConfig

class oci.generative_ai.models.VanillaTrainingConfig(**kwargs)

Bases: oci.generative_ai.models.training_config.TrainingConfig

The Vanilla training method hyperparameters.

Attributes

TRAINING_CONFIG_TYPE_TFEW_TRAINING_CONFIG str(object=’’) -> str
TRAINING_CONFIG_TYPE_VANILLA_TRAINING_CONFIG str(object=’’) -> str
early_stopping_patience Gets the early_stopping_patience of this TrainingConfig.
early_stopping_threshold Gets the early_stopping_threshold of this TrainingConfig.
learning_rate Gets the learning_rate of this TrainingConfig.
log_model_metrics_interval_in_steps Gets the log_model_metrics_interval_in_steps of this TrainingConfig.
num_of_last_layers Gets the num_of_last_layers of this VanillaTrainingConfig.
total_training_epochs Gets the total_training_epochs of this TrainingConfig.
training_batch_size Gets the training_batch_size of this TrainingConfig.
training_config_type [Required] Gets the training_config_type of this TrainingConfig.

Methods

__init__(**kwargs) Initializes a new VanillaTrainingConfig object with values from keyword arguments.
get_subtype(object_dictionary) Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
TRAINING_CONFIG_TYPE_TFEW_TRAINING_CONFIG = 'TFEW_TRAINING_CONFIG'
TRAINING_CONFIG_TYPE_VANILLA_TRAINING_CONFIG = 'VANILLA_TRAINING_CONFIG'
__init__(**kwargs)

Initializes a new VanillaTrainingConfig object with values from keyword arguments. The default value of the training_config_type attribute of this class is VANILLA_TRAINING_CONFIG and it should not be changed. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • training_config_type (str) – The value to assign to the training_config_type property of this VanillaTrainingConfig. Allowed values for this property are: “TFEW_TRAINING_CONFIG”, “VANILLA_TRAINING_CONFIG”
  • total_training_epochs (int) – The value to assign to the total_training_epochs property of this VanillaTrainingConfig.
  • learning_rate (float) – The value to assign to the learning_rate property of this VanillaTrainingConfig.
  • training_batch_size (int) – The value to assign to the training_batch_size property of this VanillaTrainingConfig.
  • early_stopping_patience (int) – The value to assign to the early_stopping_patience property of this VanillaTrainingConfig.
  • early_stopping_threshold (float) – The value to assign to the early_stopping_threshold property of this VanillaTrainingConfig.
  • log_model_metrics_interval_in_steps (int) – The value to assign to the log_model_metrics_interval_in_steps property of this VanillaTrainingConfig.
  • num_of_last_layers (int) – The value to assign to the num_of_last_layers property of this VanillaTrainingConfig.
early_stopping_patience

Gets the early_stopping_patience of this TrainingConfig. Stop training if the loss metric does not improve beyond ‘early_stopping_threshold’ for this many times of evaluation.

Returns:The early_stopping_patience of this TrainingConfig.
Return type:int
early_stopping_threshold

Gets the early_stopping_threshold of this TrainingConfig. How much the loss must improve to prevent early stopping.

Returns:The early_stopping_threshold of this TrainingConfig.
Return type:float
static get_subtype(object_dictionary)

Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.

learning_rate

Gets the learning_rate of this TrainingConfig. The initial learning rate to be used during training

Returns:The learning_rate of this TrainingConfig.
Return type:float
log_model_metrics_interval_in_steps

Gets the log_model_metrics_interval_in_steps of this TrainingConfig. Determines how frequently to log model metrics.

Every step is logged for the first 20 steps and then follows this parameter for log frequency. Set to 0 to disable logging the model metrics.

Returns:The log_model_metrics_interval_in_steps of this TrainingConfig.
Return type:int
num_of_last_layers

Gets the num_of_last_layers of this VanillaTrainingConfig. The number of last layers to be fine-tuned.

Returns:The num_of_last_layers of this VanillaTrainingConfig.
Return type:int
total_training_epochs

Gets the total_training_epochs of this TrainingConfig. The maximum number of training epochs to run for.

Returns:The total_training_epochs of this TrainingConfig.
Return type:int
training_batch_size

Gets the training_batch_size of this TrainingConfig. The batch size used during training.

Returns:The training_batch_size of this TrainingConfig.
Return type:int
training_config_type

[Required] Gets the training_config_type of this TrainingConfig. The fine-tuning method for training a custom model.

Allowed values for this property are: “TFEW_TRAINING_CONFIG”, “VANILLA_TRAINING_CONFIG”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The training_config_type of this TrainingConfig.
Return type:str