REST Resource: projects.locations.studies.trials

Resource: Trial

A message representing a Trial. A Trial contains a unique set of Parameters that has been or will be evaluated, along with the objective metrics got by running the Trial.

Fields
namestring

Output only. Resource name of the Trial assigned by the service.

idstring

Output only. The identifier of the Trial assigned by the service.

stateenum (State)

Output only. The detailed state of the Trial.

parameters[]object (Parameter)

Output only. The parameters of the Trial.

finalMeasurementobject (Measurement)

Output only. The final measurement containing the objective value.

measurements[]object (Measurement)

Output only. A list of measurements that are strictly lexicographically ordered by their induced tuples (steps, elapsedDuration). These are used for early stopping computations.

startTimestring (Timestamp format)

Output only. time when the Trial was started.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples:"2014-10-02T15:01:23Z","2014-10-02T15:01:23.045123456Z" or"2014-10-02T15:01:23+05:30".

endTimestring (Timestamp format)

Output only. time when the Trial's status changed toSUCCEEDED orINFEASIBLE.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples:"2014-10-02T15:01:23Z","2014-10-02T15:01:23.045123456Z" or"2014-10-02T15:01:23+05:30".

clientIdstring

Output only. The identifier of the client that originally requested this Trial. Each client is identified by a unique clientId. 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 clientId 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.

infeasibleReasonstring

Output only. A human readable string describing why the Trial is infeasible. This is set only if Trial state isINFEASIBLE.

customJobstring

Output only. The CustomJob name linked to the Trial. It's set for a HyperparameterTuningJob's Trial.

webAccessUrismap (key: string, value: string)

Output only. URIs for accessinginteractive shells (one URI for each training node). Only available if this trial is part of aHyperparameterTuningJob and the job'strialJobSpec.enable_web_access field istrue.

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, andworkerpool1-1 for the second node in the second worker pool.

The values are the URIs for each node's interactive shell.

JSON representation
{"name":string,"id":string,"state":enum (State),"parameters":[{object (Parameter)}],"finalMeasurement":{object (Measurement)},"measurements":[{object (Measurement)}],"startTime":string,"endTime":string,"clientId":string,"infeasibleReason":string,"customJob":string,"webAccessUris":{string:string,...}}

State

Describes a Trial state.

Enums
STATE_UNSPECIFIEDThe Trial state is unspecified.
REQUESTEDIndicates that a specific Trial has been requested, but it has not yet been suggested by the service.
ACTIVEIndicates that the Trial has been suggested.
STOPPINGIndicates that the Trial should stop according to the service.
SUCCEEDEDIndicates that the Trial is completed successfully.
INFEASIBLEIndicates that the Trial should not be attempted again. The service will set a Trial to INFEASIBLE when it's done but missing the finalMeasurement.

Parameter

A message representing a parameter to be tuned.

Fields
parameterIdstring

Output only. The id of the parameter. The parameter should be defined inStudySpec's Parameters.

valuevalue (Value format)

Output only. The value of the parameter.numberValue will be set if a parameter defined in StudySpec is in type 'INTEGER', 'DOUBLE' or 'DISCRETE'.stringValue will be set if a parameter defined in StudySpec is in type 'CATEGORICAL'.

JSON representation
{"parameterId":string,"value":value}

Methods

addTrialMeasurement

Adds a measurement of the objective metrics to a Trial.

checkTrialEarlyStoppingState

Checks whether a Trial should stop or not.

complete

Marks a Trial as complete.

create

Adds a user provided Trial to a Study.

delete

Deletes a Trial.

get

Gets a Trial.

list

Lists the Trials associated with a Study.

listOptimalTrials

Lists the pareto-optimal Trials for multi-objective Study or the optimal Trials for single-objective Study.

stop

Stops a Trial.

suggest

Adds one or more Trials to a Study, with parameter values suggested by Vertex AI Vizier.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-09-22 UTC.