Class VizierServiceClient (2.23.0-rc)

Vertex AI Vizier API.

Vertex AI Vizier is a service to solve blackbox optimization problems, such as tuning machine learning hyperparameters and searching over deep learning architectures.

Equality

Instances of this class created via copy-construction or copy-assignment always compare equal. Instances created with equal std::shared_ptr<*Connection> objects compare equal. Objects that compare equal share the same underlying resources.

Performance

Creating a new instance of this class is a relatively expensive operation, new objects establish new connections to the service. In contrast, copy-construction, move-construction, and the corresponding assignment operations are relatively efficient as the copies share all underlying resources.

Thread Safety

Concurrent access to different instances of this class, even if they compare equal, is guaranteed to work. Two or more threads operating on the same instance of this class is not guaranteed to work. Since copy-construction and move-construction is a relatively efficient operation, consider using such a copy when using this class from multiple threads.

Constructors

VizierServiceClient(VizierServiceClient const &)

Copy and move support

Parameter
NameDescription
VizierServiceClient const &

VizierServiceClient(VizierServiceClient &&)

Copy and move support

Parameter
NameDescription
VizierServiceClient &&

VizierServiceClient(std::shared_ptr< VizierServiceConnection >, Options)

Parameters
NameDescription
connection std::shared_ptr< VizierServiceConnection >
opts Options

Operators

operator=(VizierServiceClient const &)

Copy and move support

Parameter
NameDescription
VizierServiceClient const &
Returns
TypeDescription
VizierServiceClient &

operator=(VizierServiceClient &&)

Copy and move support

Parameter
NameDescription
VizierServiceClient &&
Returns
TypeDescription
VizierServiceClient &

Functions

CreateStudy(std::string const &, google::cloud::aiplatform::v1::Study const &, Options)

Creates a Study.

A resource name will be generated after creation of the Study.

Parameters
NameDescription
parent std::string const &

Required. The resource name of the Location to create the CustomJob in. Format: projects/{project}/locations/{location}

study google::cloud::aiplatform::v1::Study const &

Required. The Study configuration used to create the Study.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::aiplatform::v1::Study >

the result of the RPC. The response message type (google.cloud.aiplatform.v1.Study) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

CreateStudy(google::cloud::aiplatform::v1::CreateStudyRequest const &, Options)

Creates a Study.

A resource name will be generated after creation of the Study.

Parameters
NameDescription
request google::cloud::aiplatform::v1::CreateStudyRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.aiplatform.v1.CreateStudyRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::aiplatform::v1::Study >

the result of the RPC. The response message type (google.cloud.aiplatform.v1.Study) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetStudy(std::string const &, Options)

Gets a Study by name.

Parameters
NameDescription
name std::string const &

Required. The name of the Study resource. Format: projects/{project}/locations/{location}/studies/{study}

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::aiplatform::v1::Study >

the result of the RPC. The response message type (google.cloud.aiplatform.v1.Study) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetStudy(google::cloud::aiplatform::v1::GetStudyRequest const &, Options)

Gets a Study by name.

Parameters
NameDescription
request google::cloud::aiplatform::v1::GetStudyRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.aiplatform.v1.GetStudyRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::aiplatform::v1::Study >

the result of the RPC. The response message type (google.cloud.aiplatform.v1.Study) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

ListStudies(std::string const &, Options)

Lists all the studies in a region for an associated project.

Parameters
NameDescription
parent std::string const &

Required. The resource name of the Location to list the Study from. Format: projects/{project}/locations/{location}

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StreamRange< google::cloud::aiplatform::v1::Study >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.aiplatform.v1.Study, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListStudies(google::cloud::aiplatform::v1::ListStudiesRequest, Options)

Lists all the studies in a region for an associated project.

Parameters
NameDescription
request google::cloud::aiplatform::v1::ListStudiesRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.aiplatform.v1.ListStudiesRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StreamRange< google::cloud::aiplatform::v1::Study >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.aiplatform.v1.Study, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

DeleteStudy(std::string const &, Options)

Deletes a Study.

Parameters
NameDescription
name std::string const &

Required. The name of the Study resource to be deleted. Format: projects/{project}/locations/{location}/studies/{study}

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
Status

a Status object. If the request failed, the status contains the details of the failure.

DeleteStudy(google::cloud::aiplatform::v1::DeleteStudyRequest const &, Options)

Deletes a Study.

Parameters
NameDescription
request google::cloud::aiplatform::v1::DeleteStudyRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.aiplatform.v1.DeleteStudyRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
Status

a Status object. If the request failed, the status contains the details of the failure.

LookupStudy(std::string const &, Options)

Looks a study up using the user-defined display_name field instead of the fully qualified resource name.

Parameters
NameDescription
parent std::string const &

Required. The resource name of the Location to get the Study from. Format: projects/{project}/locations/{location}

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::aiplatform::v1::Study >

the result of the RPC. The response message type (google.cloud.aiplatform.v1.Study) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

LookupStudy(google::cloud::aiplatform::v1::LookupStudyRequest const &, Options)

Looks a study up using the user-defined display_name field instead of the fully qualified resource name.

Parameters
NameDescription
request google::cloud::aiplatform::v1::LookupStudyRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.aiplatform.v1.LookupStudyRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::aiplatform::v1::Study >

the result of the RPC. The response message type (google.cloud.aiplatform.v1.Study) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

SuggestTrials(google::cloud::aiplatform::v1::SuggestTrialsRequest const &, Options)

Adds 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.

Parameters
NameDescription
request google::cloud::aiplatform::v1::SuggestTrialsRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.aiplatform.v1.SuggestTrialsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
future< StatusOr< google::cloud::aiplatform::v1::SuggestTrialsResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.aiplatform.v1.SuggestTrialsResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

CreateTrial(std::string const &, google::cloud::aiplatform::v1::Trial const &, Options)

Adds a user provided Trial to a Study.

Parameters
NameDescription
parent std::string const &

Required. The resource name of the Study to create the Trial in. Format: projects/{project}/locations/{location}/studies/{study}

trial google::cloud::aiplatform::v1::Trial const &

Required. The Trial to create.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::aiplatform::v1::Trial >

the result of the RPC. The response message type (google.cloud.aiplatform.v1.Trial) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

CreateTrial(google::cloud::aiplatform::v1::CreateTrialRequest const &, Options)

Adds a user provided Trial to a Study.

Parameters
NameDescription
request google::cloud::aiplatform::v1::CreateTrialRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.aiplatform.v1.CreateTrialRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::aiplatform::v1::Trial >

the result of the RPC. The response message type (google.cloud.aiplatform.v1.Trial) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetTrial(std::string const &, Options)

Gets a Trial.

Parameters
NameDescription
name std::string const &

Required. The name of the Trial resource. Format: projects/{project}/locations/{location}/studies/{study}/trials/{trial}

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::aiplatform::v1::Trial >

the result of the RPC. The response message type (google.cloud.aiplatform.v1.Trial) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetTrial(google::cloud::aiplatform::v1::GetTrialRequest const &, Options)

Gets a Trial.

Parameters
NameDescription
request google::cloud::aiplatform::v1::GetTrialRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.aiplatform.v1.GetTrialRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::aiplatform::v1::Trial >

the result of the RPC. The response message type (google.cloud.aiplatform.v1.Trial) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

ListTrials(std::string const &, Options)

Lists the Trials associated with a Study.

Parameters
NameDescription
parent std::string const &

Required. The resource name of the Study to list the Trial from. Format: projects/{project}/locations/{location}/studies/{study}

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StreamRange< google::cloud::aiplatform::v1::Trial >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.aiplatform.v1.Trial, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListTrials(google::cloud::aiplatform::v1::ListTrialsRequest, Options)

Lists the Trials associated with a Study.

Parameters
NameDescription
request google::cloud::aiplatform::v1::ListTrialsRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.aiplatform.v1.ListTrialsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StreamRange< google::cloud::aiplatform::v1::Trial >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.aiplatform.v1.Trial, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

AddTrialMeasurement(google::cloud::aiplatform::v1::AddTrialMeasurementRequest const &, Options)

Adds a measurement of the objective metrics to a Trial.

This measurement is assumed to have been taken before the Trial is complete.

Parameters
NameDescription
request google::cloud::aiplatform::v1::AddTrialMeasurementRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.aiplatform.v1.AddTrialMeasurementRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::aiplatform::v1::Trial >

the result of the RPC. The response message type (google.cloud.aiplatform.v1.Trial) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

CompleteTrial(google::cloud::aiplatform::v1::CompleteTrialRequest const &, Options)

Marks a Trial as complete.

Parameters
NameDescription
request google::cloud::aiplatform::v1::CompleteTrialRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.aiplatform.v1.CompleteTrialRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::aiplatform::v1::Trial >

the result of the RPC. The response message type (google.cloud.aiplatform.v1.Trial) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

DeleteTrial(std::string const &, Options)

Deletes a Trial.

Parameters
NameDescription
name std::string const &

Required. The Trial's name. Format: projects/{project}/locations/{location}/studies/{study}/trials/{trial}

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
Status

a Status object. If the request failed, the status contains the details of the failure.

DeleteTrial(google::cloud::aiplatform::v1::DeleteTrialRequest const &, Options)

Deletes a Trial.

Parameters
NameDescription
request google::cloud::aiplatform::v1::DeleteTrialRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.aiplatform.v1.DeleteTrialRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
Status

a Status object. If the request failed, the status contains the details of the failure.

CheckTrialEarlyStoppingState(google::cloud::aiplatform::v1::CheckTrialEarlyStoppingStateRequest const &, Options)

Checks whether a Trial should stop or not.

Returns a long-running operation. When the operation is successful, it will contain a CheckTrialEarlyStoppingStateResponse.

Parameters
NameDescription
request google::cloud::aiplatform::v1::CheckTrialEarlyStoppingStateRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
future< StatusOr< google::cloud::aiplatform::v1::CheckTrialEarlyStoppingStateResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

StopTrial(google::cloud::aiplatform::v1::StopTrialRequest const &, Options)

Stops a Trial.

Parameters
NameDescription
request google::cloud::aiplatform::v1::StopTrialRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.aiplatform.v1.StopTrialRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::aiplatform::v1::Trial >

the result of the RPC. The response message type (google.cloud.aiplatform.v1.Trial) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

ListOptimalTrials(std::string const &, Options)

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

The definition of pareto-optimal can be checked in wiki page. https://en.wikipedia.org/wiki/Pareto_efficiency

Parameters
NameDescription
parent std::string const &

Required. The name of the Study that the optimal Trial belongs to.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::aiplatform::v1::ListOptimalTrialsResponse >

the result of the RPC. The response message type (google.cloud.aiplatform.v1.ListOptimalTrialsResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

ListOptimalTrials(google::cloud::aiplatform::v1::ListOptimalTrialsRequest const &, Options)

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

The definition of pareto-optimal can be checked in wiki page. https://en.wikipedia.org/wiki/Pareto_efficiency

Parameters
NameDescription
request google::cloud::aiplatform::v1::ListOptimalTrialsRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.aiplatform.v1.ListOptimalTrialsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::aiplatform::v1::ListOptimalTrialsResponse >

the result of the RPC. The response message type (google.cloud.aiplatform.v1.ListOptimalTrialsResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.