A service for creating and managing GenAI Tuning Jobs.
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
GenAiTuningServiceClient(GenAiTuningServiceClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
GenAiTuningServiceClient const &
|
GenAiTuningServiceClient(GenAiTuningServiceClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
GenAiTuningServiceClient &&
|
GenAiTuningServiceClient(std::shared_ptr< GenAiTuningServiceConnection >, Options)
Parameters | |
---|---|
Name | Description |
connection |
std::shared_ptr< GenAiTuningServiceConnection >
|
opts |
Options
|
Operators
operator=(GenAiTuningServiceClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
GenAiTuningServiceClient const &
|
Returns | |
---|---|
Type | Description |
GenAiTuningServiceClient & |
operator=(GenAiTuningServiceClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
GenAiTuningServiceClient &&
|
Returns | |
---|---|
Type | Description |
GenAiTuningServiceClient & |
Functions
CreateTuningJob(std::string const &, google::cloud::aiplatform::v1::TuningJob const &, Options)
Creates a TuningJob.
A created TuningJob right away will be attempted to be run.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. The resource name of the Location to create the TuningJob in. Format: |
tuning_job |
google::cloud::aiplatform::v1::TuningJob const &
Required. The TuningJob to create. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::aiplatform::v1::TuningJob > |
the result of the RPC. The response message type (google.cloud.aiplatform.v1.TuningJob) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
CreateTuningJob(google::cloud::aiplatform::v1::CreateTuningJobRequest const &, Options)
Creates a TuningJob.
A created TuningJob right away will be attempted to be run.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::aiplatform::v1::CreateTuningJobRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::aiplatform::v1::TuningJob > |
the result of the RPC. The response message type (google.cloud.aiplatform.v1.TuningJob) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetTuningJob(std::string const &, Options)
Gets a TuningJob.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The name of the TuningJob resource. Format: |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::aiplatform::v1::TuningJob > |
the result of the RPC. The response message type (google.cloud.aiplatform.v1.TuningJob) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetTuningJob(google::cloud::aiplatform::v1::GetTuningJobRequest const &, Options)
Gets a TuningJob.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::aiplatform::v1::GetTuningJobRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::aiplatform::v1::TuningJob > |
the result of the RPC. The response message type (google.cloud.aiplatform.v1.TuningJob) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
ListTuningJobs(std::string const &, Options)
Lists TuningJobs in a Location.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. The resource name of the Location to list the TuningJobs from. Format: |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::aiplatform::v1::TuningJob > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
ListTuningJobs(google::cloud::aiplatform::v1::ListTuningJobsRequest, Options)
Lists TuningJobs in a Location.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::aiplatform::v1::ListTuningJobsRequest
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::aiplatform::v1::TuningJob > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
CancelTuningJob(std::string const &, Options)
Cancels a TuningJob.
Starts asynchronous cancellation on the TuningJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use GenAiTuningService.GetTuningJob or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the TuningJob is not deleted; instead it becomes a job with a TuningJob.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED
, and TuningJob.state is set to CANCELLED
.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The name of the TuningJob to cancel. Format: |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
Status |
a |
CancelTuningJob(google::cloud::aiplatform::v1::CancelTuningJobRequest const &, Options)
Cancels a TuningJob.
Starts asynchronous cancellation on the TuningJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use GenAiTuningService.GetTuningJob or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the TuningJob is not deleted; instead it becomes a job with a TuningJob.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED
, and TuningJob.state is set to CANCELLED
.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::aiplatform::v1::CancelTuningJobRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
Status |
a |
RebaseTunedModel(std::string const &, google::cloud::aiplatform::v1::TunedModelRef const &, Options)
Rebase a TunedModel.
Creates a LongRunningOperation that takes a legacy Tuned GenAI model Reference and creates a TuningJob based on newly available model.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. The resource name of the Location into which to rebase the Model. Format: |
tuned_model_ref |
google::cloud::aiplatform::v1::TunedModelRef const &
Required. TunedModel reference to retrieve the legacy model information. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::aiplatform::v1::TuningJob > > |
A |
RebaseTunedModel(NoAwaitTag, std::string const &, google::cloud::aiplatform::v1::TunedModelRef const &, Options)
Rebase a TunedModel.
Specifying the NoAwaitTag
immediately returns the [google::longrunning::Operation
] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.
Parameters | |
---|---|
Name | Description |
|
NoAwaitTag
|
parent |
std::string const &
|
tuned_model_ref |
google::cloud::aiplatform::v1::TunedModelRef const &
|
opts |
Options
|
Returns | |
---|---|
Type | Description |
StatusOr< google::longrunning::Operation > |
RebaseTunedModel(google::cloud::aiplatform::v1::RebaseTunedModelRequest const &, Options)
Rebase a TunedModel.
Creates a LongRunningOperation that takes a legacy Tuned GenAI model Reference and creates a TuningJob based on newly available model.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::aiplatform::v1::RebaseTunedModelRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::aiplatform::v1::TuningJob > > |
A |
RebaseTunedModel(NoAwaitTag, google::cloud::aiplatform::v1::RebaseTunedModelRequest const &, Options)
Rebase a TunedModel.
Specifying the NoAwaitTag
immediately returns the [google::longrunning::Operation
] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.
Parameters | |
---|---|
Name | Description |
|
NoAwaitTag
|
request |
google::cloud::aiplatform::v1::RebaseTunedModelRequest const &
|
opts |
Options
|
Returns | |
---|---|
Type | Description |
StatusOr< google::longrunning::Operation > |
RebaseTunedModel(google::longrunning::Operation const &, Options)
Rebase a TunedModel.
This method accepts a google::longrunning::Operation
that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.
Parameters | |
---|---|
Name | Description |
operation |
google::longrunning::Operation const &
|
opts |
Options
|
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::aiplatform::v1::TuningJob > > |