Skip to content

Commit

Permalink
feat!: BREAKING CHANGE: remove unsupported accelerator types
Browse files Browse the repository at this point in the history
feat: add aiplatform API Vizier service

Committer: @dizcology
PiperOrigin-RevId: 363921711
  • Loading branch information
Google APIs authored and Copybara-Service committed Mar 19, 2021
1 parent 7998de5 commit 4ea5a27
Show file tree
Hide file tree
Showing 42 changed files with 1,160 additions and 118 deletions.
2 changes: 2 additions & 0 deletions google/cloud/aiplatform/v1beta1/BUILD.bazel
Expand Up @@ -59,6 +59,7 @@ proto_library(
"study.proto",
"training_pipeline.proto",
"user_action_reference.proto",
"vizier_service.proto"
],
deps = [
"//google/api:annotations_proto",
Expand Down Expand Up @@ -145,6 +146,7 @@ java_gapic_test(
"com.google.cloud.aiplatform.v1beta1.PipelineServiceClientTest",
"com.google.cloud.aiplatform.v1beta1.PredictionServiceClientTest",
"com.google.cloud.aiplatform.v1beta1.SpecialistPoolServiceClientTest",
"com.google.cloud.aiplatform.v1beta1.VizierServiceClientTest",
],
runtime_deps = [":aiplatform_java_gapic_test"],
)
Expand Down
8 changes: 1 addition & 7 deletions google/cloud/aiplatform/v1beta1/accelerator_type.proto
@@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -42,10 +42,4 @@ enum AcceleratorType {

// Nvidia Tesla T4 GPU.
NVIDIA_TESLA_T4 = 5;

// TPU v2.
TPU_V2 = 6;

// TPU v3.
TPU_V3 = 7;
}
Expand Up @@ -274,6 +274,71 @@
}
],
"timeout": "5s"
},
{
"name":[
{
"service": "google.cloud.aiplatform.v1beta1.VizierService",
"method": "CreateStudy"
},
{
"service": "google.cloud.aiplatform.v1beta1.VizierService",
"method": "GetStudy"
},
{
"service": "google.cloud.aiplatform.v1beta1.VizierService",
"method": "ListStudies"
},
{
"service": "google.cloud.aiplatform.v1beta1.VizierService",
"method": "DeleteStudy"
},
{
"service": "google.cloud.aiplatform.v1beta1.VizierService",
"method": "LookupStudy"
},
{
"service": "google.cloud.aiplatform.v1beta1.VizierService",
"method": "SuggestTrials"
},
{
"service": "google.cloud.aiplatform.v1beta1.VizierService",
"method": "CreateTrial"
},
{
"service": "google.cloud.aiplatform.v1beta1.VizierService",
"method": "GetTrial"
},
{
"service": "google.cloud.aiplatform.v1beta1.VizierService",
"method": "ListTrials"
},
{
"service": "google.cloud.aiplatform.v1beta1.VizierService",
"method": "AddTrialMeasurement"
},
{
"service": "google.cloud.aiplatform.v1beta1.VizierService",
"method": "CompleteTrial"
},
{
"service": "google.cloud.aiplatform.v1beta1.VizierService",
"method": "DeleteTrial"
},
{
"service": "google.cloud.aiplatform.v1beta1.VizierService",
"method": "CheckTrialEarlyStoppingState"
},
{
"service": "google.cloud.aiplatform.v1beta1.VizierService",
"method": "StopTrial"
},
{
"service": "google.cloud.aiplatform.v1beta1.VizierService",
"method": "ListOptimalTrials"
}
],
"timeout": "5s"
}
]
}
320 changes: 320 additions & 0 deletions google/cloud/aiplatform/v1beta1/aiplatform_v1beta1.yaml

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions google/cloud/aiplatform/v1beta1/annotation.proto
@@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -18,6 +18,7 @@ package google.cloud.aiplatform.v1beta1;

import "google/api/field_behavior.proto";
import "google/api/resource.proto";

import "google/cloud/aiplatform/v1beta1/user_action_reference.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
Expand Down Expand Up @@ -58,7 +59,7 @@ message Annotation {
// Output only. Timestamp when this Annotation was last updated.
google.protobuf.Timestamp update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];

// Optional. Used to perform a consistent read-modify-write updates. If not set, a blind
// Optional. Used to perform consistent read-modify-write updates. If not set, a blind
// "overwrite" update happens.
string etag = 8 [(google.api.field_behavior) = OPTIONAL];

Expand All @@ -79,7 +80,7 @@ message Annotation {
//
// * "aiplatform.googleapis.com/annotation_set_name":
// optional, name of the UI's annotation set this Annotation belongs to.
// If not set the Annotation is not visible in the UI.
// If not set, the Annotation is not visible in the UI.
//
// * "aiplatform.googleapis.com/payload_schema":
// output only, its value is the [payload_schema's][google.cloud.aiplatform.v1beta1.Annotation.payload_schema_uri]
Expand Down
4 changes: 2 additions & 2 deletions google/cloud/aiplatform/v1beta1/annotation_spec.proto
@@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -47,7 +47,7 @@ message AnnotationSpec {
// Output only. Timestamp when AnnotationSpec was last updated.
google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];

// Optional. Used to perform a consistent read-modify-write updates. If not set, a blind
// Optional. Used to perform consistent read-modify-write updates. If not set, a blind
// "overwrite" update happens.
string etag = 5 [(google.api.field_behavior) = OPTIONAL];
}
7 changes: 3 additions & 4 deletions google/cloud/aiplatform/v1beta1/batch_prediction_job.proto
@@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -120,7 +120,6 @@ message BatchPredictionJob {

// Required. The format in which AI Platform gives the predictions, must be one of the
// [Model's][google.cloud.aiplatform.v1beta1.BatchPredictionJob.model]
//
// [supported_output_storage_formats][google.cloud.aiplatform.v1beta1.Model.supported_output_storage_formats].
string predictions_format = 1 [(google.api.field_behavior) = REQUIRED];
}
Expand Down Expand Up @@ -206,8 +205,8 @@ message BatchPredictionJob {
// conforms to the [Explanation][google.cloud.aiplatform.v1beta1.Explanation] object.
// * `csv`: Generating explanations for CSV format is not supported.
//
// If this field is set to true, the [Model.explanation_spec][google.cloud.aiplatform.v1beta1.Model.explanation_spec] must be
// populated.
// If this field is set to true, either the [Model.explanation_spec][google.cloud.aiplatform.v1beta1.Model.explanation_spec] or
// [explanation_spec][google.cloud.aiplatform.v1beta1.BatchPredictionJob.explanation_spec] must be populated.
bool generate_explanation = 23;

// Explanation configuration for this BatchPredictionJob. Can be
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/aiplatform/v1beta1/completion_stats.proto
@@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
14 changes: 9 additions & 5 deletions google/cloud/aiplatform/v1beta1/custom_job.proto
@@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -93,6 +93,8 @@ message CustomJob {
// Represents the spec of a CustomJob.
message CustomJobSpec {
// Required. The spec of the worker pools including machine type and Docker image.
// All worker pools except the first one are optional and can be skipped by
// providing an empty value.
repeated WorkerPoolSpec worker_pool_specs = 1 [(google.api.field_behavior) = REQUIRED];

// Scheduling options for a CustomJob.
Expand Down Expand Up @@ -180,10 +182,12 @@ message ContainerSpec {

// The spec of a Python packaged code.
message PythonPackageSpec {
// Required. The URI of a container image in the Container Registry that will run the
// provided python package. AI Platform provides wide range of executor images
// with pre-installed packages to meet users' various use cases. Only one of
// the provided images can be set here.
// Required. The URI of a container image in Artifact Registry that will run the
// provided Python package. AI Platform provides a wide range of executor
// images with pre-installed packages to meet users' various use cases. See
// the list of [pre-built containers for
// training](https://cloud.google.com/ai-platform-unified/docs/training/pre-built-containers).
// You must use an image from this list.
string executor_image_uri = 1 [(google.api.field_behavior) = REQUIRED];

// Required. The Google Cloud Storage location of the Python package files which are
Expand Down
5 changes: 3 additions & 2 deletions google/cloud/aiplatform/v1beta1/data_item.proto
@@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -18,6 +18,7 @@ package google.cloud.aiplatform.v1beta1;

import "google/api/field_behavior.proto";
import "google/api/resource.proto";

import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
import "google/api/annotations.proto";
Expand Down Expand Up @@ -62,7 +63,7 @@ message DataItem {
// [metadata schema's][google.cloud.aiplatform.v1beta1.Dataset.metadata_schema_uri] dataItemSchemaUri field.
google.protobuf.Value payload = 4 [(google.api.field_behavior) = REQUIRED];

// Optional. Used to perform a consistent read-modify-write updates. If not set, a blind
// Optional. Used to perform consistent read-modify-write updates. If not set, a blind
// "overwrite" update happens.
string etag = 7 [(google.api.field_behavior) = OPTIONAL];
}
12 changes: 6 additions & 6 deletions google/cloud/aiplatform/v1beta1/data_labeling_job.proto
@@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -134,13 +134,13 @@ message DataLabelingJob {
// the EncryptionSpec of the Dataset they are exported to.
EncryptionSpec encryption_spec = 20;

// Parameters that configure active learning pipeline. Active learning will
// label the data incrementally via several iterations. For every iteration,
// it will select a batch of data based on the sampling strategy.
// Parameters that configure the active learning pipeline. Active learning
// will label the data incrementally via several iterations. For every
// iteration, it will select a batch of data based on the sampling strategy.
ActiveLearningConfig active_learning_config = 21;
}

// Parameters that configure active learning pipeline. Active learning will
// Parameters that configure the active learning pipeline. Active learning will
// label the data incrementally by several iterations. For every iteration, it
// will select a batch of data based on the sampling strategy.
message ActiveLearningConfig {
Expand Down Expand Up @@ -192,7 +192,7 @@ message SampleConfig {
int32 following_batch_sample_percentage = 3;
}

// Field to chose sampling strategy. Sampling strategy will decide which data
// Field to choose sampling strategy. Sampling strategy will decide which data
// should be selected for human labeling in every batch.
SampleStrategy sample_strategy = 5;
}
Expand Down
4 changes: 2 additions & 2 deletions google/cloud/aiplatform/v1beta1/dataset.proto
@@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -104,7 +104,7 @@ message ImportDataConfig {
// considered identical if their content bytes are identical (e.g. image bytes
// or pdf bytes).
// These labels will be overridden by Annotation labels specified inside index
// file refenced by [import_schema_uri][google.cloud.aiplatform.v1beta1.ImportDataConfig.import_schema_uri], e.g. jsonl file.
// file referenced by [import_schema_uri][google.cloud.aiplatform.v1beta1.ImportDataConfig.import_schema_uri], e.g. jsonl file.
map<string, string> data_item_labels = 2;

// Required. Points to a YAML file stored on Google Cloud Storage describing the import
Expand Down
4 changes: 1 addition & 3 deletions google/cloud/aiplatform/v1beta1/dataset_service.proto
@@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -358,7 +358,6 @@ message ListDataItemsResponse {
message GetAnnotationSpecRequest {
// Required. The name of the AnnotationSpec resource.
// Format:
//
// `projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
Expand All @@ -375,7 +374,6 @@ message GetAnnotationSpecRequest {
message ListAnnotationsRequest {
// Required. The resource name of the DataItem to list Annotations from.
// Format:
//
// `projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/aiplatform/v1beta1/deployed_model_ref.proto
@@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/aiplatform/v1beta1/encryption_spec.proto
@@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
10 changes: 5 additions & 5 deletions google/cloud/aiplatform/v1beta1/endpoint.proto
@@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -108,7 +108,7 @@ message DeployedModel {
// Output only. The ID of the DeployedModel.
string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

// Required. The name of the Model this is the deployment of. Note that the Model
// Required. The name of the Model that this is the deployment of. Note that the Model
// may be in a different location than the DeployedModel's Endpoint.
string model = 2 [
(google.api.field_behavior) = REQUIRED,
Expand All @@ -130,9 +130,9 @@ message DeployedModel {
// overrides the value of [Model.explanation_spec][google.cloud.aiplatform.v1beta1.Model.explanation_spec]. All fields of
// [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] are optional in the request. If a field of
// [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] is not populated, the value of the same field of
// [Model.explanation_spec][google.cloud.aiplatform.v1beta1.Model.explanation_spec] is inherited. The corresponding
// [Model.explanation_spec][google.cloud.aiplatform.v1beta1.Model.explanation_spec] must be populated, otherwise explanation for
// this Model is not allowed.
// [Model.explanation_spec][google.cloud.aiplatform.v1beta1.Model.explanation_spec] is inherited. If the corresponding
// [Model.explanation_spec][google.cloud.aiplatform.v1beta1.Model.explanation_spec] is not populated, all fields of the
// [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] will be used for the explanation configuration.
ExplanationSpec explanation_spec = 9;

// The service account that the DeployedModel's container runs as. Specify the
Expand Down
4 changes: 2 additions & 2 deletions google/cloud/aiplatform/v1beta1/endpoint_service.proto
@@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -192,7 +192,7 @@ message ListEndpointsResponse {
// List of Endpoints in the requested page.
repeated Endpoint endpoints = 1;

// A token to retrieve next page of results.
// A token to retrieve the next page of results.
// Pass to [ListEndpointsRequest.page_token][google.cloud.aiplatform.v1beta1.ListEndpointsRequest.page_token] to obtain that page.
string next_page_token = 2;
}
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/aiplatform/v1beta1/env_var.proto
@@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
3 changes: 2 additions & 1 deletion google/cloud/aiplatform/v1beta1/explanation.proto
@@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -18,6 +18,7 @@ package google.cloud.aiplatform.v1beta1;

import "google/api/field_behavior.proto";
import "google/cloud/aiplatform/v1beta1/explanation_metadata.proto";
import "google/cloud/aiplatform/v1beta1/io.proto";
import "google/protobuf/struct.proto";
import "google/api/annotations.proto";

Expand Down

0 comments on commit 4ea5a27

Please sign in to comment.