Skip to main content

hyperparameter_tuning_jobs

Creates, updates, deletes, gets or lists a hyperparameter_tuning_jobs resource.

Overview

Namehyperparameter_tuning_jobs
TypeResource
Idgoogle.aiplatform.hyperparameter_tuning_jobs

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOutput only. Resource name of the HyperparameterTuningJob.
createTimestring (google-datetime)Output only. Time when the HyperparameterTuningJob was created.
displayNamestringRequired. The display name of the HyperparameterTuningJob. The name can be up to 128 characters long and can consist of any UTF-8 characters.
encryptionSpecobjectCustomer-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. (id: GoogleCloudAiplatformV1EncryptionSpec)
endTimestring (google-datetime)Output only. Time when the HyperparameterTuningJob entered any of the following states: JOB_STATE_SUCCEEDED, JOB_STATE_FAILED, JOB_STATE_CANCELLED.
errorobjectOutput only. Only populated when job's state is JOB_STATE_FAILED or JOB_STATE_CANCELLED. (id: GoogleRpcStatus)
labelsobjectThe 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.
maxFailedTrialCountinteger (int32)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.
maxTrialCountinteger (int32)Required. The desired total number of Trials.
parallelTrialCountinteger (int32)Required. The desired number of Trials to run in parallel.
satisfiesPzibooleanOutput only. Reserved for future use.
satisfiesPzsbooleanOutput only. Reserved for future use.
startTimestring (google-datetime)Output only. Time when the HyperparameterTuningJob for the first time entered the JOB_STATE_RUNNING state.
statestringOutput only. The detailed state of the job.
studySpecobjectRequired. Study configuration of the HyperparameterTuningJob. (id: GoogleCloudAiplatformV1StudySpec)
trialJobSpecobjectRequired. The spec of a trial job. The same spec applies to the CustomJobs created in all the trials. (id: GoogleCloudAiplatformV1CustomJobSpec)
trialsarrayOutput only. Trials of the HyperparameterTuningJob.
updateTimestring (google-datetime)Output only. Time when the HyperparameterTuningJob was most recently updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, hyperparameterTuningJobsIdGets a HyperparameterTuningJob
listselectprojectsId, locationsIdfilter, pageSize, pageToken, readMaskLists HyperparameterTuningJobs in a Location.
createinsertprojectsId, locationsIdCreates a HyperparameterTuningJob
deletedeleteprojectsId, locationsId, hyperparameterTuningJobsIdDeletes a HyperparameterTuningJob.
cancelexecprojectsId, locationsId, hyperparameterTuningJobsIdCancels a HyperparameterTuningJob. Starts asynchronous cancellation on the HyperparameterTuningJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use JobService.GetHyperparameterTuningJob or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the HyperparameterTuningJob is not deleted; instead it becomes a job with a HyperparameterTuningJob.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED, and HyperparameterTuningJob.state is set to CANCELLED.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
hyperparameterTuningJobsIdstring
locationsIdstring
projectsIdstring
filterstring
pageSizeinteger (int32)
pageTokenstring
readMaskstring (google-fieldmask)

SELECT examples

Gets a HyperparameterTuningJob

SELECT
name,
createTime,
displayName,
encryptionSpec,
endTime,
error,
labels,
maxFailedTrialCount,
maxTrialCount,
parallelTrialCount,
satisfiesPzi,
satisfiesPzs,
startTime,
state,
studySpec,
trialJobSpec,
trials,
updateTime
FROM google.aiplatform.hyperparameter_tuning_jobs
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND hyperparameterTuningJobsId = '{{ hyperparameterTuningJobsId }}' -- required;

INSERT examples

Creates a HyperparameterTuningJob

INSERT INTO google.aiplatform.hyperparameter_tuning_jobs (
data__displayName,
data__studySpec,
data__maxTrialCount,
data__parallelTrialCount,
data__maxFailedTrialCount,
data__trialJobSpec,
data__labels,
data__encryptionSpec,
projectsId,
locationsId
)
SELECT
'{{ displayName }}',
'{{ studySpec }}',
{{ maxTrialCount }},
{{ parallelTrialCount }},
{{ maxFailedTrialCount }},
'{{ trialJobSpec }}',
'{{ labels }}',
'{{ encryptionSpec }}',
'{{ projectsId }}',
'{{ locationsId }}'
RETURNING
name,
createTime,
displayName,
encryptionSpec,
endTime,
error,
labels,
maxFailedTrialCount,
maxTrialCount,
parallelTrialCount,
satisfiesPzi,
satisfiesPzs,
startTime,
state,
studySpec,
trialJobSpec,
trials,
updateTime
;

DELETE examples

Deletes a HyperparameterTuningJob.

DELETE FROM google.aiplatform.hyperparameter_tuning_jobs
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND hyperparameterTuningJobsId = '{{ hyperparameterTuningJobsId }}' --required;

Lifecycle Methods

Cancels a HyperparameterTuningJob. Starts asynchronous cancellation on the HyperparameterTuningJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use JobService.GetHyperparameterTuningJob or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the HyperparameterTuningJob is not deleted; instead it becomes a job with a HyperparameterTuningJob.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED, and HyperparameterTuningJob.state is set to CANCELLED.

EXEC google.aiplatform.hyperparameter_tuning_jobs.cancel 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@hyperparameterTuningJobsId='{{ hyperparameterTuningJobsId }}' --required;