Skip to main content

trials

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

Overview

Nametrials
TypeResource
Idgoogle.aiplatform.trials

Fields

NameDatatypeDescription
idstringOutput only. The identifier of the Trial assigned by the service.
namestringOutput only. Resource name of the Trial assigned by the service.
clientIdstringOutput only. The identifier of the client that originally requested this Trial. Each client is identified by a unique client_id. When a client asks for a suggestion, Vertex AI Vizier will assign it a Trial. The client should evaluate the Trial, complete it, and report back to Vertex AI Vizier. If suggestion is asked again by same client_id before the Trial is completed, the same Trial will be returned. Multiple clients with different client_ids can ask for suggestions simultaneously, each of them will get their own Trial.
customJobstringOutput only. The CustomJob name linked to the Trial. It's set for a HyperparameterTuningJob's Trial.
endTimestringOutput only. Time when the Trial's status changed to SUCCEEDED or INFEASIBLE.
finalMeasurementobjectA message representing a Measurement of a Trial. A Measurement contains the Metrics got by executing a Trial using suggested hyperparameter values.
infeasibleReasonstringOutput only. A human readable string describing why the Trial is infeasible. This is set only if Trial state is INFEASIBLE.
measurementsarrayOutput only. A list of measurements that are strictly lexicographically ordered by their induced tuples (steps, elapsed_duration). These are used for early stopping computations.
parametersarrayOutput only. The parameters of the Trial.
startTimestringOutput only. Time when the Trial was started.
statestringOutput only. The detailed state of the Trial.
webAccessUrisobjectOutput only. URIs for accessing interactive shells (one URI for each training node). Only available if this trial is part of a HyperparameterTuningJob and the job's trial_job_spec.enable_web_access field is true. The keys are names of each node used for the trial; for example, workerpool0-0 for the primary node, workerpool1-0 for the first node in the second worker pool, and workerpool1-1 for the second node in the second worker pool. The values are the URIs for each node's interactive shell.

Methods

NameAccessible byRequired ParamsDescription
getSELECTlocationsId, projectsId, studiesId, trialsIdGets a Trial.
listSELECTlocationsId, projectsId, studiesIdLists the Trials associated with a Study.
createINSERTlocationsId, projectsId, studiesIdAdds a user provided Trial to a Study.
deleteDELETElocationsId, projectsId, studiesId, trialsIdDeletes a Trial.
check_trial_early_stopping_stateEXEClocationsId, projectsId, studiesId, trialsIdChecks whether a Trial should stop or not. Returns a long-running operation. When the operation is successful, it will contain a CheckTrialEarlyStoppingStateResponse.
completeEXEClocationsId, projectsId, studiesId, trialsIdMarks a Trial as complete.
stopEXEClocationsId, projectsId, studiesId, trialsIdStops a Trial.
suggestEXEClocationsId, projectsId, studiesIdAdds one or more Trials to a Study, with parameter values suggested by Vertex AI Vizier. Returns a long-running operation associated with the generation of Trial suggestions. When this long-running operation succeeds, it will contain a SuggestTrialsResponse.

SELECT examples

Lists the Trials associated with a Study.

SELECT
id,
name,
clientId,
customJob,
endTime,
finalMeasurement,
infeasibleReason,
measurements,
parameters,
startTime,
state,
webAccessUris
FROM google.aiplatform.trials
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND studiesId = '{{ studiesId }}';

INSERT example

Use the following StackQL query and manifest file to create a new trials resource.

/*+ create */
INSERT INTO google.aiplatform.trials (
locationsId,
projectsId,
studiesId
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ studiesId }}'
;

DELETE example

Deletes the specified trials resource.

/*+ delete */
DELETE FROM google.aiplatform.trials
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND studiesId = '{{ studiesId }}'
AND trialsId = '{{ trialsId }}';