Class HyperparameterTuningJob (3.35.0)

public final class HyperparameterTuningJob extends GeneratedMessageV3 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 Fields

CREATE_TIME_FIELD_NUMBER

public static final int CREATE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
TypeDescription
int

ENCRYPTION_SPEC_FIELD_NUMBER

public static final int ENCRYPTION_SPEC_FIELD_NUMBER
Field Value
TypeDescription
int

END_TIME_FIELD_NUMBER

public static final int END_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

ERROR_FIELD_NUMBER

public static final int ERROR_FIELD_NUMBER
Field Value
TypeDescription
int

LABELS_FIELD_NUMBER

public static final int LABELS_FIELD_NUMBER
Field Value
TypeDescription
int

MAX_FAILED_TRIAL_COUNT_FIELD_NUMBER

public static final int MAX_FAILED_TRIAL_COUNT_FIELD_NUMBER
Field Value
TypeDescription
int

MAX_TRIAL_COUNT_FIELD_NUMBER

public static final int MAX_TRIAL_COUNT_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

PARALLEL_TRIAL_COUNT_FIELD_NUMBER

public static final int PARALLEL_TRIAL_COUNT_FIELD_NUMBER
Field Value
TypeDescription
int

START_TIME_FIELD_NUMBER

public static final int START_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

STATE_FIELD_NUMBER

public static final int STATE_FIELD_NUMBER
Field Value
TypeDescription
int

STUDY_SPEC_FIELD_NUMBER

public static final int STUDY_SPEC_FIELD_NUMBER
Field Value
TypeDescription
int

TRIALS_FIELD_NUMBER

public static final int TRIALS_FIELD_NUMBER
Field Value
TypeDescription
int

TRIAL_JOB_SPEC_FIELD_NUMBER

public static final int TRIAL_JOB_SPEC_FIELD_NUMBER
Field Value
TypeDescription
int

UPDATE_TIME_FIELD_NUMBER

public static final int UPDATE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static HyperparameterTuningJob getDefaultInstance()
Returns
TypeDescription
HyperparameterTuningJob

getDescriptor()

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

newBuilder()

public static HyperparameterTuningJob.Builder newBuilder()
Returns
TypeDescription
HyperparameterTuningJob.Builder

newBuilder(HyperparameterTuningJob prototype)

public static HyperparameterTuningJob.Builder newBuilder(HyperparameterTuningJob prototype)
Parameter
NameDescription
prototypeHyperparameterTuningJob
Returns
TypeDescription
HyperparameterTuningJob.Builder

parseDelimitedFrom(InputStream input)

public static HyperparameterTuningJob parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
HyperparameterTuningJob
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static HyperparameterTuningJob parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
HyperparameterTuningJob
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static HyperparameterTuningJob parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
HyperparameterTuningJob
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static HyperparameterTuningJob parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
HyperparameterTuningJob
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static HyperparameterTuningJob parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
HyperparameterTuningJob
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static HyperparameterTuningJob parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
HyperparameterTuningJob
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static HyperparameterTuningJob parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
HyperparameterTuningJob
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static HyperparameterTuningJob parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
HyperparameterTuningJob
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static HyperparameterTuningJob parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
HyperparameterTuningJob
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static HyperparameterTuningJob parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
HyperparameterTuningJob
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static HyperparameterTuningJob parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
HyperparameterTuningJob
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static HyperparameterTuningJob parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
HyperparameterTuningJob
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<HyperparameterTuningJob> parser()
Returns
TypeDescription
Parser<HyperparameterTuningJob>

Methods

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

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

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.

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

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.

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.

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.

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.

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.

getParserForType()

public Parser<HyperparameterTuningJob> getParserForType()
Returns
TypeDescription
Parser<HyperparameterTuningJob>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

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.

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];

Returns
TypeDescription
int

The enum numeric value on the wire for state.

getStudySpec()

public StudySpec getStudySpec()

Required. Study configuration of the HyperparameterTuningJob.

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

Returns
TypeDescription
StudySpec

The studySpec.

getStudySpecOrBuilder()

public StudySpecOrBuilder getStudySpecOrBuilder()

Required. Study configuration of the HyperparameterTuningJob.

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

Returns
TypeDescription
StudySpecOrBuilder

getTrialJobSpec()

public CustomJobSpec getTrialJobSpec()

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
CustomJobSpec

The trialJobSpec.

getTrialJobSpecOrBuilder()

public CustomJobSpecOrBuilder getTrialJobSpecOrBuilder()

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
CustomJobSpecOrBuilder

getTrials(int index)

public Trial getTrials(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

getTrialsCount()

public int getTrialsCount()

Output only. Trials of the HyperparameterTuningJob.

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

Returns
TypeDescription
int

getTrialsList()

public List<Trial> getTrialsList()

Output only. Trials of the HyperparameterTuningJob.

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

Returns
TypeDescription
List<Trial>

getTrialsOrBuilder(int index)

public TrialOrBuilder getTrialsOrBuilder(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
TrialOrBuilder

getTrialsOrBuilderList()

public List<? extends TrialOrBuilder> getTrialsOrBuilderList()

Output only. Trials of the HyperparameterTuningJob.

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

Returns
TypeDescription
List<? extends com.google.cloud.aiplatform.v1beta1.TrialOrBuilder>

getUpdateTime()

public Timestamp getUpdateTime()

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

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

Returns
TypeDescription
Timestamp

The updateTime.

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

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

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

Returns
TypeDescription
TimestampOrBuilder

hasCreateTime()

public boolean hasCreateTime()

Output only. Time when the HyperparameterTuningJob was created.

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

Returns
TypeDescription
boolean

Whether the createTime field is set.

hasEncryptionSpec()

public boolean hasEncryptionSpec()

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
boolean

Whether the encryptionSpec field is set.

hasEndTime()

public boolean hasEndTime()

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
boolean

Whether the endTime field is set.

hasError()

public boolean hasError()

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
boolean

Whether the error field is set.

hasStartTime()

public boolean hasStartTime()

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
boolean

Whether the startTime field is set.

hasStudySpec()

public boolean hasStudySpec()

Required. Study configuration of the HyperparameterTuningJob.

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

Returns
TypeDescription
boolean

Whether the studySpec field is set.

hasTrialJobSpec()

public boolean hasTrialJobSpec()

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
boolean

Whether the trialJobSpec field is set.

hasUpdateTime()

public boolean hasUpdateTime()

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

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

Returns
TypeDescription
boolean

Whether the updateTime field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected HyperparameterTuningJob.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
HyperparameterTuningJob.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

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

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException