Class SupervisedTuningSpec.Builder (3.84.0)

public static final class SupervisedTuningSpec.Builder extends GeneratedMessage.Builder<SupervisedTuningSpec.Builder> implements SupervisedTuningSpecOrBuilder

Tuning Spec for Supervised Tuning for first party models.

Protobuf type google.cloud.aiplatform.v1.SupervisedTuningSpec

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

build()

public SupervisedTuningSpec build()
Returns
Type Description
SupervisedTuningSpec

buildPartial()

public SupervisedTuningSpec buildPartial()
Returns
Type Description
SupervisedTuningSpec

clear()

public SupervisedTuningSpec.Builder clear()
Returns
Type Description
SupervisedTuningSpec.Builder
Overrides

clearExportLastCheckpointOnly()

public SupervisedTuningSpec.Builder clearExportLastCheckpointOnly()

Optional. 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.

bool export_last_checkpoint_only = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
SupervisedTuningSpec.Builder

This builder for chaining.

clearHyperParameters()

public SupervisedTuningSpec.Builder clearHyperParameters()

Optional. Hyperparameters for SFT.

.google.cloud.aiplatform.v1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
SupervisedTuningSpec.Builder

clearTrainingDatasetUri()

public SupervisedTuningSpec.Builder clearTrainingDatasetUri()

Required. Cloud Storage path to file containing training dataset for tuning. The dataset must be formatted as a JSONL file.

string training_dataset_uri = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
SupervisedTuningSpec.Builder

This builder for chaining.

clearValidationDatasetUri()

public SupervisedTuningSpec.Builder clearValidationDatasetUri()

Optional. Cloud Storage path to file containing validation dataset for tuning. The dataset must be formatted as a JSONL file.

string validation_dataset_uri = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
SupervisedTuningSpec.Builder

This builder for chaining.

getDefaultInstanceForType()

public SupervisedTuningSpec getDefaultInstanceForType()
Returns
Type Description
SupervisedTuningSpec

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getExportLastCheckpointOnly()

public boolean getExportLastCheckpointOnly()

Optional. 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.

bool export_last_checkpoint_only = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The exportLastCheckpointOnly.

getHyperParameters()

public SupervisedHyperParameters getHyperParameters()

Optional. Hyperparameters for SFT.

.google.cloud.aiplatform.v1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
SupervisedHyperParameters

The hyperParameters.

getHyperParametersBuilder()

public SupervisedHyperParameters.Builder getHyperParametersBuilder()

Optional. Hyperparameters for SFT.

.google.cloud.aiplatform.v1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
SupervisedHyperParameters.Builder

getHyperParametersOrBuilder()

public SupervisedHyperParametersOrBuilder getHyperParametersOrBuilder()

Optional. Hyperparameters for SFT.

.google.cloud.aiplatform.v1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
SupervisedHyperParametersOrBuilder

getTrainingDatasetUri()

public String getTrainingDatasetUri()

Required. Cloud Storage path to file containing training dataset for tuning. The dataset must be formatted as a JSONL file.

string training_dataset_uri = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The trainingDatasetUri.

getTrainingDatasetUriBytes()

public ByteString getTrainingDatasetUriBytes()

Required. Cloud Storage path to file containing training dataset for tuning. The dataset must be formatted as a JSONL file.

string training_dataset_uri = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for trainingDatasetUri.

getValidationDatasetUri()

public String getValidationDatasetUri()

Optional. Cloud Storage path to file containing validation dataset for tuning. The dataset must be formatted as a JSONL file.

string validation_dataset_uri = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The validationDatasetUri.

getValidationDatasetUriBytes()

public ByteString getValidationDatasetUriBytes()

Optional. Cloud Storage path to file containing validation dataset for tuning. The dataset must be formatted as a JSONL file.

string validation_dataset_uri = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for validationDatasetUri.

hasHyperParameters()

public boolean hasHyperParameters()

Optional. Hyperparameters for SFT.

.google.cloud.aiplatform.v1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the hyperParameters field is set.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(SupervisedTuningSpec other)

public SupervisedTuningSpec.Builder mergeFrom(SupervisedTuningSpec other)
Parameter
Name Description
other SupervisedTuningSpec
Returns
Type Description
SupervisedTuningSpec.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public SupervisedTuningSpec.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SupervisedTuningSpec.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public SupervisedTuningSpec.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
SupervisedTuningSpec.Builder
Overrides

mergeHyperParameters(SupervisedHyperParameters value)

public SupervisedTuningSpec.Builder mergeHyperParameters(SupervisedHyperParameters value)

Optional. Hyperparameters for SFT.

.google.cloud.aiplatform.v1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value SupervisedHyperParameters
Returns
Type Description
SupervisedTuningSpec.Builder

setExportLastCheckpointOnly(boolean value)

public SupervisedTuningSpec.Builder setExportLastCheckpointOnly(boolean value)

Optional. 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.

bool export_last_checkpoint_only = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value boolean

The exportLastCheckpointOnly to set.

Returns
Type Description
SupervisedTuningSpec.Builder

This builder for chaining.

setHyperParameters(SupervisedHyperParameters value)

public SupervisedTuningSpec.Builder setHyperParameters(SupervisedHyperParameters value)

Optional. Hyperparameters for SFT.

.google.cloud.aiplatform.v1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value SupervisedHyperParameters
Returns
Type Description
SupervisedTuningSpec.Builder

setHyperParameters(SupervisedHyperParameters.Builder builderForValue)

public SupervisedTuningSpec.Builder setHyperParameters(SupervisedHyperParameters.Builder builderForValue)

Optional. Hyperparameters for SFT.

.google.cloud.aiplatform.v1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue SupervisedHyperParameters.Builder
Returns
Type Description
SupervisedTuningSpec.Builder

setTrainingDatasetUri(String value)

public SupervisedTuningSpec.Builder setTrainingDatasetUri(String value)

Required. Cloud Storage path to file containing training dataset for tuning. The dataset must be formatted as a JSONL file.

string training_dataset_uri = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The trainingDatasetUri to set.

Returns
Type Description
SupervisedTuningSpec.Builder

This builder for chaining.

setTrainingDatasetUriBytes(ByteString value)

public SupervisedTuningSpec.Builder setTrainingDatasetUriBytes(ByteString value)

Required. Cloud Storage path to file containing training dataset for tuning. The dataset must be formatted as a JSONL file.

string training_dataset_uri = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for trainingDatasetUri to set.

Returns
Type Description
SupervisedTuningSpec.Builder

This builder for chaining.

setValidationDatasetUri(String value)

public SupervisedTuningSpec.Builder setValidationDatasetUri(String value)

Optional. Cloud Storage path to file containing validation dataset for tuning. The dataset must be formatted as a JSONL file.

string validation_dataset_uri = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The validationDatasetUri to set.

Returns
Type Description
SupervisedTuningSpec.Builder

This builder for chaining.

setValidationDatasetUriBytes(ByteString value)

public SupervisedTuningSpec.Builder setValidationDatasetUriBytes(ByteString value)

Optional. Cloud Storage path to file containing validation dataset for tuning. The dataset must be formatted as a JSONL file.

string validation_dataset_uri = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for validationDatasetUri to set.

Returns
Type Description
SupervisedTuningSpec.Builder

This builder for chaining.