Class HyperparameterTuningJob.Builder (3.32.0)

public static final class HyperparameterTuningJob.Builder extends GeneratedMessageV3.Builder<HyperparameterTuningJob.Builder> implements HyperparameterTuningJobOrBuilder

Represents a HyperparameterTuningJob. A HyperparameterTuningJob has a Study specification and multiple CustomJobs with identical CustomJob specification.

Protobuf type google.cloud.aiplatform.v1beta1.HyperparameterTuningJob

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllTrials(Iterable<? extends Trial> values)

public HyperparameterTuningJob.Builder addAllTrials(Iterable<? extends Trial> values)

Output only. Trials of the HyperparameterTuningJob.

repeated .google.cloud.aiplatform.v1beta1.Trial trials = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.aiplatform.v1beta1.Trial>
Returns
TypeDescription
HyperparameterTuningJob.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public HyperparameterTuningJob.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
HyperparameterTuningJob.Builder
Overrides

addTrials(Trial value)

public HyperparameterTuningJob.Builder addTrials(Trial value)

Output only. Trials of the HyperparameterTuningJob.

repeated .google.cloud.aiplatform.v1beta1.Trial trials = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueTrial
Returns
TypeDescription
HyperparameterTuningJob.Builder

addTrials(Trial.Builder builderForValue)

public HyperparameterTuningJob.Builder addTrials(Trial.Builder builderForValue)

Output only. Trials of the HyperparameterTuningJob.

repeated .google.cloud.aiplatform.v1beta1.Trial trials = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
builderForValueTrial.Builder
Returns
TypeDescription
HyperparameterTuningJob.Builder

addTrials(int index, Trial value)

public HyperparameterTuningJob.Builder addTrials(int index, Trial value)

Output only. Trials of the HyperparameterTuningJob.

repeated .google.cloud.aiplatform.v1beta1.Trial trials = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
NameDescription
indexint
valueTrial
Returns
TypeDescription
HyperparameterTuningJob.Builder

addTrials(int index, Trial.Builder builderForValue)

public HyperparameterTuningJob.Builder addTrials(int index, Trial.Builder builderForValue)

Output only. Trials of the HyperparameterTuningJob.

repeated .google.cloud.aiplatform.v1beta1.Trial trials = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
NameDescription
indexint
builderForValueTrial.Builder
Returns
TypeDescription
HyperparameterTuningJob.Builder

addTrialsBuilder()

public Trial.Builder addTrialsBuilder()

Output only. Trials of the HyperparameterTuningJob.

repeated .google.cloud.aiplatform.v1beta1.Trial trials = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Trial.Builder

addTrialsBuilder(int index)

public Trial.Builder addTrialsBuilder(int index)

Output only. Trials of the HyperparameterTuningJob.

repeated .google.cloud.aiplatform.v1beta1.Trial trials = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
indexint
Returns
TypeDescription
Trial.Builder

build()

public HyperparameterTuningJob build()
Returns
TypeDescription
HyperparameterTuningJob

buildPartial()

public HyperparameterTuningJob buildPartial()
Returns
TypeDescription
HyperparameterTuningJob

clear()

public HyperparameterTuningJob.Builder clear()
Returns
TypeDescription
HyperparameterTuningJob.Builder
Overrides

clearCreateTime()

public HyperparameterTuningJob.Builder clearCreateTime()

Output only. Time when the HyperparameterTuningJob was created.

.google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
HyperparameterTuningJob.Builder

clearDisplayName()

public HyperparameterTuningJob.Builder clearDisplayName()

Required. The display name of the HyperparameterTuningJob. The name can be up to 128 characters long and can consist of any UTF-8 characters.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
HyperparameterTuningJob.Builder

This builder for chaining.

clearEncryptionSpec()

public HyperparameterTuningJob.Builder clearEncryptionSpec()

Customer-managed encryption key options for a HyperparameterTuningJob. If this is set, then all resources created by the HyperparameterTuningJob will be encrypted with the provided encryption key.

.google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 17;

Returns
TypeDescription
HyperparameterTuningJob.Builder

clearEndTime()

public HyperparameterTuningJob.Builder clearEndTime()

Output only. Time when the HyperparameterTuningJob entered any of the following states: JOB_STATE_SUCCEEDED, JOB_STATE_FAILED, JOB_STATE_CANCELLED.

.google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
HyperparameterTuningJob.Builder

clearError()

public HyperparameterTuningJob.Builder clearError()

Output only. Only populated when job's state is JOB_STATE_FAILED or JOB_STATE_CANCELLED.

.google.rpc.Status error = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
HyperparameterTuningJob.Builder

clearField(Descriptors.FieldDescriptor field)

public HyperparameterTuningJob.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
HyperparameterTuningJob.Builder
Overrides

clearLabels()

public HyperparameterTuningJob.Builder clearLabels()
Returns
TypeDescription
HyperparameterTuningJob.Builder

clearMaxFailedTrialCount()

public HyperparameterTuningJob.Builder clearMaxFailedTrialCount()

The number of failed Trials that need to be seen before failing the HyperparameterTuningJob.

If set to 0, Vertex AI decides how many Trials must fail before the whole job fails.

int32 max_failed_trial_count = 7;

Returns
TypeDescription
HyperparameterTuningJob.Builder

This builder for chaining.

clearMaxTrialCount()

public HyperparameterTuningJob.Builder clearMaxTrialCount()

Required. The desired total number of Trials.

int32 max_trial_count = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
HyperparameterTuningJob.Builder

This builder for chaining.

clearName()

public HyperparameterTuningJob.Builder clearName()

Output only. Resource name of the HyperparameterTuningJob.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
HyperparameterTuningJob.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public HyperparameterTuningJob.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
HyperparameterTuningJob.Builder
Overrides

clearParallelTrialCount()

public HyperparameterTuningJob.Builder clearParallelTrialCount()

Required. The desired number of Trials to run in parallel.

int32 parallel_trial_count = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
HyperparameterTuningJob.Builder

This builder for chaining.

clearStartTime()

public HyperparameterTuningJob.Builder clearStartTime()

Output only. Time when the HyperparameterTuningJob for the first time entered the JOB_STATE_RUNNING state.

.google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
HyperparameterTuningJob.Builder

clearState()

public HyperparameterTuningJob.Builder clearState()

Output only. The detailed state of the job.

.google.cloud.aiplatform.v1beta1.JobState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
HyperparameterTuningJob.Builder

This builder for chaining.

clearStudySpec()

public HyperparameterTuningJob.Builder clearStudySpec()

Required. Study configuration of the HyperparameterTuningJob.

.google.cloud.aiplatform.v1beta1.StudySpec study_spec = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
HyperparameterTuningJob.Builder

clearTrialJobSpec()

public HyperparameterTuningJob.Builder clearTrialJobSpec()

Required. The spec of a trial job. The same spec applies to the CustomJobs created in all the trials.

.google.cloud.aiplatform.v1beta1.CustomJobSpec trial_job_spec = 8 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
HyperparameterTuningJob.Builder

clearTrials()

public HyperparameterTuningJob.Builder clearTrials()

Output only. Trials of the HyperparameterTuningJob.

repeated .google.cloud.aiplatform.v1beta1.Trial trials = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
HyperparameterTuningJob.Builder

clearUpdateTime()

public HyperparameterTuningJob.Builder clearUpdateTime()

Output only. Time when the HyperparameterTuningJob was most recently updated.

.google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
HyperparameterTuningJob.Builder

clone()

public HyperparameterTuningJob.Builder clone()
Returns
TypeDescription
HyperparameterTuningJob.Builder
Overrides

containsLabels(String key)

public boolean containsLabels(String key)

The labels with user-defined metadata to organize HyperparameterTuningJobs.

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.

map<string, string> labels = 16;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getCreateTime()

public Timestamp getCreateTime()

Output only. Time when the HyperparameterTuningJob was created.

.google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. Time when the HyperparameterTuningJob was created.

.google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Time when the HyperparameterTuningJob was created.

.google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public HyperparameterTuningJob getDefaultInstanceForType()
Returns
TypeDescription
HyperparameterTuningJob

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDisplayName()

public String getDisplayName()

Required. The display name of the HyperparameterTuningJob. The name can be up to 128 characters long and can consist of any UTF-8 characters.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Required. The display name of the HyperparameterTuningJob. The name can be up to 128 characters long and can consist of any UTF-8 characters.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
ByteString

The bytes for displayName.

getEncryptionSpec()

public EncryptionSpec getEncryptionSpec()

Customer-managed encryption key options for a HyperparameterTuningJob. If this is set, then all resources created by the HyperparameterTuningJob will be encrypted with the provided encryption key.

.google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 17;

Returns
TypeDescription
EncryptionSpec

The encryptionSpec.

getEncryptionSpecBuilder()

public EncryptionSpec.Builder getEncryptionSpecBuilder()

Customer-managed encryption key options for a HyperparameterTuningJob. If this is set, then all resources created by the HyperparameterTuningJob will be encrypted with the provided encryption key.

.google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 17;

Returns
TypeDescription
EncryptionSpec.Builder

getEncryptionSpecOrBuilder()

public EncryptionSpecOrBuilder getEncryptionSpecOrBuilder()

Customer-managed encryption key options for a HyperparameterTuningJob. If this is set, then all resources created by the HyperparameterTuningJob will be encrypted with the provided encryption key.

.google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 17;

Returns
TypeDescription
EncryptionSpecOrBuilder

getEndTime()

public Timestamp getEndTime()

Output only. Time when the HyperparameterTuningJob entered any of the following states: JOB_STATE_SUCCEEDED, JOB_STATE_FAILED, JOB_STATE_CANCELLED.

.google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Timestamp

The endTime.

getEndTimeBuilder()

public Timestamp.Builder getEndTimeBuilder()

Output only. Time when the HyperparameterTuningJob entered any of the following states: JOB_STATE_SUCCEEDED, JOB_STATE_FAILED, JOB_STATE_CANCELLED.

.google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Builder

getEndTimeOrBuilder()

public TimestampOrBuilder getEndTimeOrBuilder()

Output only. Time when the HyperparameterTuningJob entered any of the following states: JOB_STATE_SUCCEEDED, JOB_STATE_FAILED, JOB_STATE_CANCELLED.

.google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
TimestampOrBuilder

getError()

public Status getError()

Output only. Only populated when job's state is JOB_STATE_FAILED or JOB_STATE_CANCELLED.

.google.rpc.Status error = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
com.google.rpc.Status

The error.

getErrorBuilder()

public Status.Builder getErrorBuilder()

Output only. Only populated when job's state is JOB_STATE_FAILED or JOB_STATE_CANCELLED.

.google.rpc.Status error = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
com.google.rpc.Status.Builder

getErrorOrBuilder()

public StatusOrBuilder getErrorOrBuilder()

Output only. Only populated when job's state is JOB_STATE_FAILED or JOB_STATE_CANCELLED.

.google.rpc.Status error = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
com.google.rpc.StatusOrBuilder

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
Map<String,String>

getLabelsCount()

public int getLabelsCount()

The labels with user-defined metadata to organize HyperparameterTuningJobs.

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.

map<string, string> labels = 16;

Returns
TypeDescription
int

getLabelsMap()

public Map<String,String> getLabelsMap()

The labels with user-defined metadata to organize HyperparameterTuningJobs.

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.

map<string, string> labels = 16;

Returns
TypeDescription
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

The labels with user-defined metadata to organize HyperparameterTuningJobs.

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.

map<string, string> labels = 16;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

The labels with user-defined metadata to organize HyperparameterTuningJobs.

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.

map<string, string> labels = 16;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getMaxFailedTrialCount()

public int getMaxFailedTrialCount()

The number of failed Trials that need to be seen before failing the HyperparameterTuningJob.

If set to 0, Vertex AI decides how many Trials must fail before the whole job fails.

int32 max_failed_trial_count = 7;

Returns
TypeDescription
int

The maxFailedTrialCount.

getMaxTrialCount()

public int getMaxTrialCount()

Required. The desired total number of Trials.

int32 max_trial_count = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
int

The maxTrialCount.

getMutableLabels() (deprecated)

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

getName()

public String getName()

Output only. Resource name of the HyperparameterTuningJob.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. Resource name of the HyperparameterTuningJob.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for name.

getParallelTrialCount()

public int getParallelTrialCount()

Required. The desired number of Trials to run in parallel.

int32 parallel_trial_count = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
int

The parallelTrialCount.

getStartTime()

public Timestamp getStartTime()

Output only. Time when the HyperparameterTuningJob for the first time entered the JOB_STATE_RUNNING state.

.google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Timestamp

The startTime.

getStartTimeBuilder()

public Timestamp.Builder getStartTimeBuilder()

Output only. Time when the HyperparameterTuningJob for the first time entered the JOB_STATE_RUNNING state.

.google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Builder

getStartTimeOrBuilder()

public TimestampOrBuilder getStartTimeOrBuilder()

Output only. Time when the HyperparameterTuningJob for the first time entered the JOB_STATE_RUNNING state.

.google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
TimestampOrBuilder

getState()

public JobState getState()

Output only. The detailed state of the job.

.google.cloud.aiplatform.v1beta1.JobState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
JobState

The state.

getStateValue()

public int getStateValue()

Output only. The detailed state of the job.

.google.cloud.aiplatform.v1beta1.JobState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];