Class CreateTuningJobConfig.Builder
-
- All Implemented Interfaces:
public abstract class CreateTuningJobConfig.BuilderBuilder for CreateTuningJobConfig.
-
-
Constructor Summary
Constructors Constructor Description CreateTuningJobConfig.Builder()
-
Method Summary
Modifier and Type Method Description abstract CreateTuningJobConfig.BuilderhttpOptions(HttpOptions httpOptions)Setter for httpOptions. CreateTuningJobConfig.BuilderhttpOptions(HttpOptions.Builder httpOptionsBuilder)Setter for httpOptions builder. CreateTuningJobConfig.BuilderclearHttpOptions()Clears the value of httpOptions field. abstract CreateTuningJobConfig.Buildermethod(TuningMethod method)Setter for method. CreateTuningJobConfig.BuilderclearMethod()Clears the value of method field. CreateTuningJobConfig.Buildermethod(TuningMethod.Known knownType)Setter for method given a known enum. CreateTuningJobConfig.Buildermethod(String method)Setter for method given a string. abstract CreateTuningJobConfig.BuildervalidationDataset(TuningValidationDataset validationDataset)Setter for validationDataset. CreateTuningJobConfig.BuildervalidationDataset(TuningValidationDataset.Builder validationDatasetBuilder)Setter for validationDataset builder. CreateTuningJobConfig.BuilderclearValidationDataset()Clears the value of validationDataset field. abstract CreateTuningJobConfig.BuildertunedModelDisplayName(String tunedModelDisplayName)Setter for tunedModelDisplayName. CreateTuningJobConfig.BuilderclearTunedModelDisplayName()Clears the value of tunedModelDisplayName field. abstract CreateTuningJobConfig.Builderdescription(String description)Setter for description. CreateTuningJobConfig.BuilderclearDescription()Clears the value of description field. abstract CreateTuningJobConfig.BuilderepochCount(Integer epochCount)Setter for epochCount. CreateTuningJobConfig.BuilderclearEpochCount()Clears the value of epochCount field. abstract CreateTuningJobConfig.BuilderlearningRateMultiplier(Float learningRateMultiplier)Setter for learningRateMultiplier. CreateTuningJobConfig.BuilderclearLearningRateMultiplier()Clears the value of learningRateMultiplier field. abstract CreateTuningJobConfig.BuilderexportLastCheckpointOnly(boolean exportLastCheckpointOnly)Setter for exportLastCheckpointOnly. CreateTuningJobConfig.BuilderclearExportLastCheckpointOnly()Clears the value of exportLastCheckpointOnly field. abstract CreateTuningJobConfig.BuilderpreTunedModelCheckpointId(String preTunedModelCheckpointId)Setter for preTunedModelCheckpointId. CreateTuningJobConfig.BuilderclearPreTunedModelCheckpointId()Clears the value of preTunedModelCheckpointId field. abstract CreateTuningJobConfig.BuilderadapterSize(AdapterSize adapterSize)Setter for adapterSize. CreateTuningJobConfig.BuilderclearAdapterSize()Clears the value of adapterSize field. CreateTuningJobConfig.BuilderadapterSize(AdapterSize.Known knownType)Setter for adapterSize given a known enum. CreateTuningJobConfig.BuilderadapterSize(String adapterSize)Setter for adapterSize given a string. abstract CreateTuningJobConfig.BuildertuningMode(TuningMode tuningMode)Setter for tuningMode. CreateTuningJobConfig.BuilderclearTuningMode()Clears the value of tuningMode field. CreateTuningJobConfig.BuildertuningMode(TuningMode.Known knownType)Setter for tuningMode given a known enum. CreateTuningJobConfig.BuildertuningMode(String tuningMode)Setter for tuningMode given a string. abstract CreateTuningJobConfig.BuildercustomBaseModel(String customBaseModel)Setter for customBaseModel. CreateTuningJobConfig.BuilderclearCustomBaseModel()Clears the value of customBaseModel field. abstract CreateTuningJobConfig.BuilderbatchSize(Integer batchSize)Setter for batchSize. CreateTuningJobConfig.BuilderclearBatchSize()Clears the value of batchSize field. abstract CreateTuningJobConfig.BuilderlearningRate(Float learningRate)Setter for learningRate. CreateTuningJobConfig.BuilderclearLearningRate()Clears the value of learningRate field. abstract CreateTuningJobConfig.BuilderevaluationConfig(EvaluationConfig evaluationConfig)Setter for evaluationConfig. CreateTuningJobConfig.BuilderevaluationConfig(EvaluationConfig.Builder evaluationConfigBuilder)Setter for evaluationConfig builder. CreateTuningJobConfig.BuilderclearEvaluationConfig()Clears the value of evaluationConfig field. abstract CreateTuningJobConfig.Builderlabels(Map<String, String> labels)Setter for labels. CreateTuningJobConfig.BuilderclearLabels()Clears the value of labels field. abstract CreateTuningJobConfig.Builderbeta(Float beta)Setter for beta. CreateTuningJobConfig.BuilderclearBeta()Clears the value of beta field. abstract CreateTuningJobConfig.BuilderbaseTeacherModel(String baseTeacherModel)Setter for baseTeacherModel. CreateTuningJobConfig.BuilderclearBaseTeacherModel()Clears the value of baseTeacherModel field. abstract CreateTuningJobConfig.BuildertunedTeacherModelSource(String tunedTeacherModelSource)Setter for tunedTeacherModelSource. CreateTuningJobConfig.BuilderclearTunedTeacherModelSource()Clears the value of tunedTeacherModelSource field. abstract CreateTuningJobConfig.BuildersftLossWeightMultiplier(Float sftLossWeightMultiplier)Setter for sftLossWeightMultiplier. CreateTuningJobConfig.BuilderclearSftLossWeightMultiplier()Clears the value of sftLossWeightMultiplier field. abstract CreateTuningJobConfig.BuilderoutputUri(String outputUri)Setter for outputUri. CreateTuningJobConfig.BuilderclearOutputUri()Clears the value of outputUri field. abstract CreateTuningJobConfig.BuilderencryptionSpec(EncryptionSpec encryptionSpec)Setter for encryptionSpec. CreateTuningJobConfig.BuilderencryptionSpec(EncryptionSpec.Builder encryptionSpecBuilder)Setter for encryptionSpec builder. CreateTuningJobConfig.BuilderclearEncryptionSpec()Clears the value of encryptionSpec field. abstract CreateTuningJobConfigbuild()-
-
Method Detail
-
httpOptions
abstract CreateTuningJobConfig.Builder httpOptions(HttpOptions httpOptions)
Setter for httpOptions.
httpOptions: Used to override HTTP request options.
-
httpOptions
@CanIgnoreReturnValue() CreateTuningJobConfig.Builder httpOptions(HttpOptions.Builder httpOptionsBuilder)
Setter for httpOptions builder.
httpOptions: Used to override HTTP request options.
-
clearHttpOptions
@CanIgnoreReturnValue() CreateTuningJobConfig.Builder clearHttpOptions()
Clears the value of httpOptions field.
-
method
abstract CreateTuningJobConfig.Builder method(TuningMethod method)
Setter for method.
method: The method to use for tuning (SUPERVISED_FINE_TUNING or PREFERENCE_TUNING or DISTILLATION). If not set, the default method (SFT) will be used.
-
clearMethod
@CanIgnoreReturnValue() CreateTuningJobConfig.Builder clearMethod()
Clears the value of method field.
-
method
@CanIgnoreReturnValue() CreateTuningJobConfig.Builder method(TuningMethod.Known knownType)
Setter for method given a known enum.
method: The method to use for tuning (SUPERVISED_FINE_TUNING or PREFERENCE_TUNING or DISTILLATION). If not set, the default method (SFT) will be used.
-
method
@CanIgnoreReturnValue() CreateTuningJobConfig.Builder method(String method)
Setter for method given a string.
method: The method to use for tuning (SUPERVISED_FINE_TUNING or PREFERENCE_TUNING or DISTILLATION). If not set, the default method (SFT) will be used.
-
validationDataset
abstract CreateTuningJobConfig.Builder validationDataset(TuningValidationDataset validationDataset)
Setter for validationDataset.
validationDataset: Validation dataset for tuning. The dataset must be formatted as a JSONL file.
-
validationDataset
@CanIgnoreReturnValue() CreateTuningJobConfig.Builder validationDataset(TuningValidationDataset.Builder validationDatasetBuilder)
Setter for validationDataset builder.
validationDataset: Validation dataset for tuning. The dataset must be formatted as a JSONL file.
-
clearValidationDataset
@CanIgnoreReturnValue() CreateTuningJobConfig.Builder clearValidationDataset()
Clears the value of validationDataset field.
-
tunedModelDisplayName
abstract CreateTuningJobConfig.Builder tunedModelDisplayName(String tunedModelDisplayName)
Setter for tunedModelDisplayName.
tunedModelDisplayName: The display name of the tuned Model. The name can be up to 128 characters long and can consist of any UTF-8 characters.
-
clearTunedModelDisplayName
@CanIgnoreReturnValue() CreateTuningJobConfig.Builder clearTunedModelDisplayName()
Clears the value of tunedModelDisplayName field.
-
description
abstract CreateTuningJobConfig.Builder description(String description)
Setter for description.
description: The description of the TuningJob
-
clearDescription
@CanIgnoreReturnValue() CreateTuningJobConfig.Builder clearDescription()
Clears the value of description field.
-
epochCount
abstract CreateTuningJobConfig.Builder epochCount(Integer epochCount)
Setter for epochCount.
epochCount: Number of complete passes the model makes over the entire training dataset during training.
-
clearEpochCount
@CanIgnoreReturnValue() CreateTuningJobConfig.Builder clearEpochCount()
Clears the value of epochCount field.
-
learningRateMultiplier
abstract CreateTuningJobConfig.Builder learningRateMultiplier(Float learningRateMultiplier)
Setter for learningRateMultiplier.
learningRateMultiplier: Multiplier for adjusting the default learning rate. 1P models only. Mutually exclusive with learning_rate.
-
clearLearningRateMultiplier
@CanIgnoreReturnValue() CreateTuningJobConfig.Builder clearLearningRateMultiplier()
Clears the value of learningRateMultiplier field.
-
exportLastCheckpointOnly
abstract CreateTuningJobConfig.Builder exportLastCheckpointOnly(boolean exportLastCheckpointOnly)
Setter for exportLastCheckpointOnly.
exportLastCheckpointOnly: If set to true, disable intermediate checkpoints and only the last checkpoint will be exported. Otherwise, enable intermediate checkpoints.
-
clearExportLastCheckpointOnly
@CanIgnoreReturnValue() CreateTuningJobConfig.Builder clearExportLastCheckpointOnly()
Clears the value of exportLastCheckpointOnly field.
-
preTunedModelCheckpointId
abstract CreateTuningJobConfig.Builder preTunedModelCheckpointId(String preTunedModelCheckpointId)
Setter for preTunedModelCheckpointId.
preTunedModelCheckpointId: The optional checkpoint id of the pre-tuned model to use for tuning, if applicable.
-
clearPreTunedModelCheckpointId
@CanIgnoreReturnValue() CreateTuningJobConfig.Builder clearPreTunedModelCheckpointId()
Clears the value of preTunedModelCheckpointId field.
-
adapterSize
abstract CreateTuningJobConfig.Builder adapterSize(AdapterSize adapterSize)
Setter for adapterSize.
adapterSize: Adapter size for tuning.
-
clearAdapterSize
@CanIgnoreReturnValue() CreateTuningJobConfig.Builder clearAdapterSize()
Clears the value of adapterSize field.
-
adapterSize
@CanIgnoreReturnValue() CreateTuningJobConfig.Builder adapterSize(AdapterSize.Known knownType)
Setter for adapterSize given a known enum.
adapterSize: Adapter size for tuning.
-
adapterSize
@CanIgnoreReturnValue() CreateTuningJobConfig.Builder adapterSize(String adapterSize)
Setter for adapterSize given a string.
adapterSize: Adapter size for tuning.
-
tuningMode
abstract CreateTuningJobConfig.Builder tuningMode(TuningMode tuningMode)
Setter for tuningMode.
tuningMode: Tuning mode for tuning.
-
clearTuningMode
@CanIgnoreReturnValue() CreateTuningJobConfig.Builder clearTuningMode()
Clears the value of tuningMode field.
-
tuningMode
@CanIgnoreReturnValue() CreateTuningJobConfig.Builder tuningMode(TuningMode.Known knownType)
Setter for tuningMode given a known enum.
tuningMode: Tuning mode for tuning.
-
tuningMode
@CanIgnoreReturnValue() CreateTuningJobConfig.Builder tuningMode(String tuningMode)
Setter for tuningMode given a string.
tuningMode: Tuning mode for tuning.
-
customBaseModel
abstract CreateTuningJobConfig.Builder customBaseModel(String customBaseModel)
Setter for customBaseModel.
customBaseModel: Custom base model for tuning. This is only supported for OSS models in Gemini Enterprise Agent Platform.
-
clearCustomBaseModel
@CanIgnoreReturnValue() CreateTuningJobConfig.Builder clearCustomBaseModel()
Clears the value of customBaseModel field.
-
batchSize
abstract CreateTuningJobConfig.Builder batchSize(Integer batchSize)
Setter for batchSize.
batchSize: The batch size hyperparameter for tuning. This is only supported for OSS models in Gemini Enterprise Agent Platform.
-
clearBatchSize
@CanIgnoreReturnValue() CreateTuningJobConfig.Builder clearBatchSize()
Clears the value of batchSize field.
-
learningRate
abstract CreateTuningJobConfig.Builder learningRate(Float learningRate)
Setter for learningRate.
learningRate: The learning rate for tuning. OSS models only. Mutually exclusive with learning_rate_multiplier.
-
clearLearningRate
@CanIgnoreReturnValue() CreateTuningJobConfig.Builder clearLearningRate()
Clears the value of learningRate field.
-
evaluationConfig
abstract CreateTuningJobConfig.Builder evaluationConfig(EvaluationConfig evaluationConfig)
Setter for evaluationConfig.
evaluationConfig: Evaluation config for the tuning job.
-
evaluationConfig
@CanIgnoreReturnValue() CreateTuningJobConfig.Builder evaluationConfig(EvaluationConfig.Builder evaluationConfigBuilder)
Setter for evaluationConfig builder.
evaluationConfig: Evaluation config for the tuning job.
-
clearEvaluationConfig
@CanIgnoreReturnValue() CreateTuningJobConfig.Builder clearEvaluationConfig()
Clears the value of evaluationConfig field.
-
labels
abstract CreateTuningJobConfig.Builder labels(Map<String, String> labels)
Setter for labels.
labels: Optional. The labels with user-defined metadata to organize TuningJob and generated resources such as Model and Endpoint. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels.
-
clearLabels
@CanIgnoreReturnValue() CreateTuningJobConfig.Builder clearLabels()
Clears the value of labels field.
-
beta
abstract CreateTuningJobConfig.Builder beta(Float beta)
Setter for beta.
beta: Weight for KL Divergence regularization, Preference Optimization tuning only.
-
clearBeta
@CanIgnoreReturnValue() CreateTuningJobConfig.Builder clearBeta()
Clears the value of beta field.
-
baseTeacherModel
abstract CreateTuningJobConfig.Builder baseTeacherModel(String baseTeacherModel)
Setter for baseTeacherModel.
baseTeacherModel: The base teacher model that is being distilled. Distillation only.
-
clearBaseTeacherModel
@CanIgnoreReturnValue() CreateTuningJobConfig.Builder clearBaseTeacherModel()
Clears the value of baseTeacherModel field.
-
tunedTeacherModelSource
abstract CreateTuningJobConfig.Builder tunedTeacherModelSource(String tunedTeacherModelSource)
Setter for tunedTeacherModelSource.
tunedTeacherModelSource: The resource name of the Tuned teacher model. Distillation only.
-
clearTunedTeacherModelSource
@CanIgnoreReturnValue() CreateTuningJobConfig.Builder clearTunedTeacherModelSource()
Clears the value of tunedTeacherModelSource field.
-
sftLossWeightMultiplier
abstract CreateTuningJobConfig.Builder sftLossWeightMultiplier(Float sftLossWeightMultiplier)
Setter for sftLossWeightMultiplier.
sftLossWeightMultiplier: Multiplier for adjusting the weight of the SFT loss. Distillation only.
-
clearSftLossWeightMultiplier
@CanIgnoreReturnValue() CreateTuningJobConfig.Builder clearSftLossWeightMultiplier()
Clears the value of sftLossWeightMultiplier field.
-
outputUri
abstract CreateTuningJobConfig.Builder outputUri(String outputUri)
Setter for outputUri.
outputUri: The Google Cloud Storage location where the tuning job outputs are written.
-
clearOutputUri
@CanIgnoreReturnValue() CreateTuningJobConfig.Builder clearOutputUri()
Clears the value of outputUri field.
-
encryptionSpec
abstract CreateTuningJobConfig.Builder encryptionSpec(EncryptionSpec encryptionSpec)
Setter for encryptionSpec.
encryptionSpec: The encryption spec of the tuning job. Customer-managed encryption key options for a TuningJob. If this is set, then all resources created by the TuningJob will be encrypted with provided encryption key.
-
encryptionSpec
@CanIgnoreReturnValue() CreateTuningJobConfig.Builder encryptionSpec(EncryptionSpec.Builder encryptionSpecBuilder)
Setter for encryptionSpec builder.
encryptionSpec: The encryption spec of the tuning job. Customer-managed encryption key options for a TuningJob. If this is set, then all resources created by the TuningJob will be encrypted with provided encryption key.
-
clearEncryptionSpec
@CanIgnoreReturnValue() CreateTuningJobConfig.Builder clearEncryptionSpec()
Clears the value of encryptionSpec field.
-
build
abstract CreateTuningJobConfig build()
-
-
-
-