Skip to content

Commit

Permalink
feat: GenAiTuningService aiplatform v1 initial release
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 620892708
  • Loading branch information
Google APIs authored and Copybara-Service committed Apr 1, 2024
1 parent 25a31d8 commit 152a4c1
Show file tree
Hide file tree
Showing 4 changed files with 451 additions and 1 deletion.
2 changes: 2 additions & 0 deletions google/cloud/aiplatform/v1/BUILD.bazel
Expand Up @@ -70,6 +70,7 @@ proto_library(
"featurestore_monitoring.proto",
"featurestore_online_service.proto",
"featurestore_service.proto",
"genai_tuning_service.proto",
"hyperparameter_tuning_job.proto",
"index.proto",
"index_endpoint.proto",
Expand Down Expand Up @@ -127,6 +128,7 @@ proto_library(
"tensorboard_time_series.proto",
"tool.proto",
"training_pipeline.proto",
"tuning_job.proto",
"types.proto",
"unmanaged_container_model.proto",
"user_action_reference.proto",
Expand Down
7 changes: 6 additions & 1 deletion google/cloud/aiplatform/v1/aiplatform_v1.yaml
Expand Up @@ -12,6 +12,7 @@ apis:
- name: google.cloud.aiplatform.v1.FeatureRegistryService
- name: google.cloud.aiplatform.v1.FeaturestoreOnlineServingService
- name: google.cloud.aiplatform.v1.FeaturestoreService
- name: google.cloud.aiplatform.v1.GenAiTuningService
- name: google.cloud.aiplatform.v1.IndexEndpointService
- name: google.cloud.aiplatform.v1.IndexService
- name: google.cloud.aiplatform.v1.JobService
Expand Down Expand Up @@ -684,6 +685,10 @@ authentication:
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
- selector: 'google.cloud.aiplatform.v1.GenAiTuningService.*'
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
- selector: 'google.cloud.aiplatform.v1.IndexEndpointService.*'
oauth:
canonical_scopes: |-
Expand Down Expand Up @@ -834,8 +839,8 @@ authentication:
https://www.googleapis.com/auth/cloud-platform
publishing:
documentation_uri: https://cloud.google.com/ai-platform/docs
new_issue_uri: https://issuetracker.google.com/issues/new?component=1130925&template=1637248
documentation_uri: https://cloud.google.com/ai-platform/docs
github_label: 'api: aiplatform'
organization: CLOUD
library_settings:
Expand Down
164 changes: 164 additions & 0 deletions google/cloud/aiplatform/v1/genai_tuning_service.proto
@@ -0,0 +1,164 @@
// Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.cloud.aiplatform.v1;

import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/aiplatform/v1/tuning_job.proto";
import "google/protobuf/empty.proto";

option csharp_namespace = "Google.Cloud.AIPlatform.V1";
option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb";
option java_multiple_files = true;
option java_outer_classname = "GenAiTuningServiceProto";
option java_package = "com.google.cloud.aiplatform.v1";
option php_namespace = "Google\\Cloud\\AIPlatform\\V1";
option ruby_package = "Google::Cloud::AIPlatform::V1";

// A service for creating and managing GenAI Tuning Jobs.
service GenAiTuningService {
option (google.api.default_host) = "aiplatform.googleapis.com";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/cloud-platform";

// Creates a TuningJob. A created TuningJob right away will be attempted to
// be run.
rpc CreateTuningJob(CreateTuningJobRequest) returns (TuningJob) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/locations/*}/tuningJobs"
body: "tuning_job"
};
option (google.api.method_signature) = "parent,tuning_job";
}

// Gets a TuningJob.
rpc GetTuningJob(GetTuningJobRequest) returns (TuningJob) {
option (google.api.http) = {
get: "/v1/{name=projects/*/locations/*/tuningJobs/*}"
};
option (google.api.method_signature) = "name";
}

// Lists TuningJobs in a Location.
rpc ListTuningJobs(ListTuningJobsRequest) returns (ListTuningJobsResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/locations/*}/tuningJobs"
};
option (google.api.method_signature) = "parent";
}

// 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][google.cloud.aiplatform.v1.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][google.cloud.aiplatform.v1.TuningJob.error] value with a
// [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
// `Code.CANCELLED`, and
// [TuningJob.state][google.cloud.aiplatform.v1.TuningJob.state] is set to
// `CANCELLED`.
rpc CancelTuningJob(CancelTuningJobRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/v1/{name=projects/*/locations/*/tuningJobs/*}:cancel"
body: "*"
};
option (google.api.method_signature) = "name";
}
}

// Request message for
// [GenAiTuningService.CreateTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.CreateTuningJob].
message CreateTuningJobRequest {
// Required. The resource name of the Location to create the TuningJob in.
// Format: `projects/{project}/locations/{location}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "locations.googleapis.com/Location"
}
];

// Required. The TuningJob to create.
TuningJob tuning_job = 2 [(google.api.field_behavior) = REQUIRED];
}

// Request message for
// [GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob].
message GetTuningJobRequest {
// Required. The name of the TuningJob resource. Format:
// `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/TuningJob"
}
];
}

// Request message for
// [GenAiTuningService.ListTuningJobs][google.cloud.aiplatform.v1.GenAiTuningService.ListTuningJobs].
message ListTuningJobsRequest {
// Required. The resource name of the Location to list the TuningJobs from.
// Format: `projects/{project}/locations/{location}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "locations.googleapis.com/Location"
}
];

// Optional. The standard list filter.
string filter = 2 [(google.api.field_behavior) = OPTIONAL];

// Optional. The standard list page size.
int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];

// Optional. The standard list page token.
// Typically obtained via [ListTuningJob.next_page_token][] of the
// previous GenAiTuningService.ListTuningJob][] call.
string page_token = 4 [(google.api.field_behavior) = OPTIONAL];
}

// Response message for
// [GenAiTuningService.ListTuningJobs][google.cloud.aiplatform.v1.GenAiTuningService.ListTuningJobs]
message ListTuningJobsResponse {
// List of TuningJobs in the requested page.
repeated TuningJob tuning_jobs = 1;

// A token to retrieve the next page of results.
// Pass to
// [ListTuningJobsRequest.page_token][google.cloud.aiplatform.v1.ListTuningJobsRequest.page_token]
// to obtain that page.
string next_page_token = 2;
}

// Request message for
// [GenAiTuningService.CancelTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.CancelTuningJob].
message CancelTuningJobRequest {
// Required. The name of the TuningJob to cancel. Format:
// `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/TuningJob"
}
];
}

0 comments on commit 152a4c1

Please sign in to comment.