ruạṛ
a ���f� � @ sD d dl mZ ddlmZmZmZ ddlmZ eG dd� de��ZdS )� )�TrainingConfig� )�formatted_flat_dict� NONE_SENTINEL�#value_allowed_none_or_none_sentinel)�init_model_state_from_kwargsc @ s~ e Zd ZdZdd� Zedd� �Zejdd� �Zedd� �Zejd d� �Zed d� �Z e jdd� �Z d d� Z dd� Zdd� ZdS )�LoraTrainingConfigz3 The Lora training method hyperparameters. c K s~ ddddddddddd� | _ ddddd d ddd dd� | _d| _d| _d| _d| _d| _d| _d| _d| _ d| _ d| _d| _dS )a� Initializes a new LoraTrainingConfig object with values from keyword arguments. The default value of the :py:attr:`~oci.generative_ai.models.LoraTrainingConfig.training_config_type` attribute of this class is ``LORA_TRAINING_CONFIG`` and it should not be changed. The following keyword arguments are supported (corresponding to the getters/setters of this class): :param training_config_type: The value to assign to the training_config_type property of this LoraTrainingConfig. Allowed values for this property are: "TFEW_TRAINING_CONFIG", "VANILLA_TRAINING_CONFIG", "LORA_TRAINING_CONFIG" :type training_config_type: str :param total_training_epochs: The value to assign to the total_training_epochs property of this LoraTrainingConfig. :type total_training_epochs: int :param learning_rate: The value to assign to the learning_rate property of this LoraTrainingConfig. :type learning_rate: float :param training_batch_size: The value to assign to the training_batch_size property of this LoraTrainingConfig. :type training_batch_size: int :param early_stopping_patience: The value to assign to the early_stopping_patience property of this LoraTrainingConfig. :type early_stopping_patience: int :param early_stopping_threshold: The value to assign to the early_stopping_threshold property of this LoraTrainingConfig. :type early_stopping_threshold: float :param log_model_metrics_interval_in_steps: The value to assign to the log_model_metrics_interval_in_steps property of this LoraTrainingConfig. :type log_model_metrics_interval_in_steps: int :param lora_r: The value to assign to the lora_r property of this LoraTrainingConfig. :type lora_r: int :param lora_alpha: The value to assign to the lora_alpha property of this LoraTrainingConfig. :type lora_alpha: int :param lora_dropout: The value to assign to the lora_dropout property of this LoraTrainingConfig. :type lora_dropout: float �str�int�float) Ztraining_config_typeZtotal_training_epochsZ learning_rateZtraining_batch_sizeZearly_stopping_patienceZearly_stopping_thresholdZ#log_model_metrics_interval_in_steps�lora_r� lora_alpha�lora_dropoutZtrainingConfigTypeZtotalTrainingEpochsZlearningRateZtrainingBatchSizeZearlyStoppingPatienceZearlyStoppingThresholdZlogModelMetricsIntervalInStepsZloraRZ loraAlphaZloraDropoutNZLORA_TRAINING_CONFIG)Z swagger_typesZ attribute_mapZ_training_config_typeZ_total_training_epochsZ_learning_rateZ_training_batch_sizeZ_early_stopping_patienceZ_early_stopping_thresholdZ$_log_model_metrics_interval_in_steps�_lora_r�_lora_alpha� _lora_dropout)�self�kwargs� r �Q/usr/lib/python3.9/site-packages/oci/generative_ai/models/lora_training_config.py�__init__ sB 1�� zLoraTrainingConfig.__init__c C s | j S )z� Gets the lora_r of this LoraTrainingConfig. This parameter represents the LoRA rank of the update matrices. :return: The lora_r of this LoraTrainingConfig. :rtype: int �r �r r r r r h s zLoraTrainingConfig.lora_rc C s || _ dS )z� Sets the lora_r of this LoraTrainingConfig. This parameter represents the LoRA rank of the update matrices. :param lora_r: The lora_r of this LoraTrainingConfig. :type: int Nr )r r r r r r t s c C s | j S )z� Gets the lora_alpha of this LoraTrainingConfig. This parameter represents the scaling factor for the weight matrices in LoRA. :return: The lora_alpha of this LoraTrainingConfig. :rtype: int �r r r r r r � s zLoraTrainingConfig.lora_alphac C s || _ dS )z� Sets the lora_alpha of this LoraTrainingConfig. This parameter represents the scaling factor for the weight matrices in LoRA. :param lora_alpha: The lora_alpha of this LoraTrainingConfig. :type: int Nr )r r r r r r � s c C s | j S )z� Gets the lora_dropout of this LoraTrainingConfig. This parameter indicates the dropout probability for LoRA layers. :return: The lora_dropout of this LoraTrainingConfig. :rtype: float �r r r r r r � s zLoraTrainingConfig.lora_dropoutc C s || _ dS )z� Sets the lora_dropout of this LoraTrainingConfig. This parameter indicates the dropout probability for LoRA layers. :param lora_dropout: The lora_dropout of this LoraTrainingConfig. :type: float Nr )r r r r r r � s c C s t | �S �N)r r r r r �__repr__� s zLoraTrainingConfig.__repr__c C s |d u rdS | j |j kS )NF)�__dict__�r �otherr r r �__eq__� s zLoraTrainingConfig.__eq__c C s | |k S r r r r r r �__ne__� s zLoraTrainingConfig.__ne__N) �__name__� __module__�__qualname__�__doc__r �propertyr �setterr r r r r! r r r r r s"