Skip to content

Commit 01293cf

Browse files
Google APIscopybara-github
authored andcommitted
feat: add TPU_V4_POD to AcceleratorType in aiplatform v1beta1 accelerator_type.proto
feat: add split to ExportDataConfig in aiplatform v1beta1 dataset.proto feat: add evaluated_annotation.proto to aiplatform v1beta1 feat: add cpu_utilization_target to Featurestore.OnlineServingConfig.Scaling in aiplatform v1beta1 featurestore.proto feat: add large_model_reference to Model in aiplatform v1beta1 model.proto feat: add slice_spec to ModelEvaluationSlice in aiplatform v1beta1 model_evaluation_slice.proto feat: add BatchImportEvaluatedAnnotations rpc to aiplatform v1beta1 model_service.proto docs: deprecated enable_restricted_image_training in NasJob in aiplatform v1beta1 nas_job.proto PiperOrigin-RevId: 513669538
1 parent 9716b12 commit 01293cf

26 files changed

Lines changed: 495 additions & 32 deletions

google/cloud/aiplatform/v1beta1/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ proto_library(
4242
"endpoint_service.proto",
4343
"entity_type.proto",
4444
"env_var.proto",
45+
"evaluated_annotation.proto",
4546
"event.proto",
4647
"execution.proto",
4748
"explanation.proto",

google/cloud/aiplatform/v1beta1/accelerator_type.proto

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1";
2525
option ruby_package = "Google::Cloud::AIPlatform::V1beta1";
2626

2727
// Represents a hardware accelerator type.
28+
// NEXT ID: 11.
2829
enum AcceleratorType {
2930
// Unspecified accelerator type, which means no accelerator.
3031
ACCELERATOR_TYPE_UNSPECIFIED = 0;
@@ -55,4 +56,7 @@ enum AcceleratorType {
5556

5657
// TPU v3.
5758
TPU_V3 = 7;
59+
60+
// TPU v4.
61+
TPU_V4_POD = 10;
5862
}

google/cloud/aiplatform/v1beta1/aiplatform_v1beta1.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ http:
238238
- post: '/ui/{name=projects/*/locations/*/studies/*/trials/*/operations/*}:cancel'
239239
- post: '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:cancel'
240240
- post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel'
241+
- post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel'
241242
- post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel'
242243
- post: '/ui/{name=projects/*/locations/*/tensorboards/*/operations/*}:cancel'
243244
- post: '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}:cancel'
@@ -302,6 +303,7 @@ http:
302303
- delete: '/ui/{name=projects/*/locations/*/studies/*/trials/*/operations/*}'
303304
- delete: '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}'
304305
- delete: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}'
306+
- delete: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}'
305307
- delete: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}'
306308
- delete: '/ui/{name=projects/*/locations/*/tensorboards/*/operations/*}'
307309
- delete: '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}'
@@ -367,6 +369,7 @@ http:
367369
- get: '/ui/{name=projects/*/locations/*/studies/*/trials/*/operations/*}'
368370
- get: '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}'
369371
- get: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}'
372+
- get: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}'
370373
- get: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}'
371374
- get: '/ui/{name=projects/*/locations/*/tensorboards/*/operations/*}'
372375
- get: '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}'
@@ -431,6 +434,7 @@ http:
431434
- get: '/ui/{name=projects/*/locations/*/studies/*/trials/*}/operations'
432435
- get: '/ui/{name=projects/*/locations/*/trainingPipelines/*}/operations'
433436
- get: '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations'
437+
- get: '/ui/{name=projects/*/locations/*/schedules/*}/operations'
434438
- get: '/ui/{name=projects/*/locations/*/specialistPools/*}/operations'
435439
- get: '/ui/{name=projects/*/locations/*/tensorboards/*}/operations'
436440
- get: '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*}/operations'
@@ -495,6 +499,7 @@ http:
495499
- post: '/ui/{name=projects/*/locations/*/studies/*/trials/*/operations/*}:wait'
496500
- post: '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait'
497501
- post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait'
502+
- post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait'
498503
- post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait'
499504
- post: '/ui/{name=projects/*/locations/*/tensorboards/*/operations/*}:wait'
500505
- post: '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}:wait'

google/cloud/aiplatform/v1beta1/batch_prediction_job.proto

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,11 @@ message BatchPredictionJob {
278278
// Exactly one of model and unmanaged_container_model must be set.
279279
//
280280
// The model resource name may contain version id or version alias to specify
281-
// the version, if no version is specified, the default version will be used.
281+
// the version.
282+
// Example: `projects/{project}/locations/{location}/models/{model}@2`
283+
// or
284+
// `projects/{project}/locations/{location}/models/{model}@golden`
285+
// if no version is specified, the default version will be deployed.
282286
string model = 3 [(google.api.resource_reference) = {
283287
type: "aiplatform.googleapis.com/Model"
284288
}];

google/cloud/aiplatform/v1beta1/dataset.proto

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,33 @@ message ExportDataConfig {
170170
GcsDestination gcs_destination = 1;
171171
}
172172

173+
// The instructions how the export data should be split between the
174+
// training, validation and test sets.
175+
oneof split {
176+
// Split based on fractions defining the size of each set.
177+
ExportFractionSplit fraction_split = 5;
178+
}
179+
173180
// A filter on Annotations of the Dataset. Only Annotations on to-be-exported
174181
// DataItems(specified by [data_items_filter][]) that match this filter will
175182
// be exported. The filter syntax is the same as in
176183
// [ListAnnotations][google.cloud.aiplatform.v1beta1.DatasetService.ListAnnotations].
177184
string annotations_filter = 2;
178185
}
186+
187+
// Assigns the input data to training, validation, and test sets as per the
188+
// given fractions. Any of `training_fraction`, `validation_fraction` and
189+
// `test_fraction` may optionally be provided, they must sum to up to 1. If the
190+
// provided ones sum to less than 1, the remainder is assigned to sets as
191+
// decided by Vertex AI. If none of the fractions are set, by default roughly
192+
// 80% of data is used for training, 10% for validation, and 10% for test.
193+
message ExportFractionSplit {
194+
// The fraction of the input data that is to be used to train the Model.
195+
double training_fraction = 1;
196+
197+
// The fraction of the input data that is to be used to validate the Model.
198+
double validation_fraction = 2;
199+
200+
// The fraction of the input data that is to be used to evaluate the Model.
201+
double test_fraction = 3;
202+
}

google/cloud/aiplatform/v1beta1/dataset_service.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import "google/cloud/aiplatform/v1beta1/dataset.proto";
2727
import "google/cloud/aiplatform/v1beta1/operation.proto";
2828
import "google/cloud/aiplatform/v1beta1/saved_query.proto";
2929
import "google/longrunning/operations.proto";
30+
import "google/protobuf/empty.proto";
3031
import "google/protobuf/field_mask.proto";
3132

3233
option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1";

google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import "google/cloud/aiplatform/v1beta1/deployment_resource_pool.proto";
2525
import "google/cloud/aiplatform/v1beta1/endpoint.proto";
2626
import "google/cloud/aiplatform/v1beta1/operation.proto";
2727
import "google/longrunning/operations.proto";
28+
import "google/protobuf/empty.proto";
2829

2930
option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1";
3031
option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb";

google/cloud/aiplatform/v1beta1/endpoint.proto

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,11 @@ message DeployedModel {
176176
// Endpoint.
177177
//
178178
// The resource name may contain version id or version alias to specify the
179-
// version, if no version is specified, the default version will be deployed.
179+
// version.
180+
// Example: `projects/{project}/locations/{location}/models/{model}@2`
181+
// or
182+
// `projects/{project}/locations/{location}/models/{model}@golden`
183+
// if no version is specified, the default version will be deployed.
180184
string model = 2 [
181185
(google.api.field_behavior) = REQUIRED,
182186
(google.api.resource_reference) = {

google/cloud/aiplatform/v1beta1/endpoint_service.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import "google/api/resource.proto";
2323
import "google/cloud/aiplatform/v1beta1/endpoint.proto";
2424
import "google/cloud/aiplatform/v1beta1/operation.proto";
2525
import "google/longrunning/operations.proto";
26+
import "google/protobuf/empty.proto";
2627
import "google/protobuf/field_mask.proto";
2728

2829
option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1";
Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
// Copyright 2022 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
17+
package google.cloud.aiplatform.v1beta1;
18+
19+
import "google/api/field_behavior.proto";
20+
import "google/cloud/aiplatform/v1beta1/explanation.proto";
21+
import "google/protobuf/struct.proto";
22+
23+
option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1";
24+
option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb";
25+
option java_multiple_files = true;
26+
option java_outer_classname = "EvaluatedAnnotationProto";
27+
option java_package = "com.google.cloud.aiplatform.v1beta1";
28+
option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1";
29+
option ruby_package = "Google::Cloud::AIPlatform::V1beta1";
30+
31+
// True positive, false positive, or false negative.
32+
//
33+
// EvaluatedAnnotation is only available under ModelEvaluationSlice with slice
34+
// of `annotationSpec` dimension.
35+
message EvaluatedAnnotation {
36+
// Describes the type of the EvaluatedAnnotation. The type is determined
37+
enum EvaluatedAnnotationType {
38+
// Invalid value.
39+
EVALUATED_ANNOTATION_TYPE_UNSPECIFIED = 0;
40+
41+
// The EvaluatedAnnotation is a true positive. It has a prediction created
42+
// by the Model and a ground truth Annotation which the prediction matches.
43+
TRUE_POSITIVE = 1;
44+
45+
// The EvaluatedAnnotation is false positive. It has a prediction created by
46+
// the Model which does not match any ground truth annotation.
47+
FALSE_POSITIVE = 2;
48+
49+
// The EvaluatedAnnotation is false negative. It has a ground truth
50+
// annotation which is not matched by any of the model created predictions.
51+
FALSE_NEGATIVE = 3;
52+
}
53+
54+
// Output only. Type of the EvaluatedAnnotation.
55+
EvaluatedAnnotationType type = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
56+
57+
// Output only. The model predicted annotations.
58+
//
59+
// For true positive, there is one and only one prediction, which matches the
60+
// only one ground truth annotation in
61+
// [ground_truths][google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.ground_truths].
62+
//
63+
// For false positive, there is one and only one prediction, which doesn't
64+
// match any ground truth annotation of the corresponding
65+
// [data_item_view_id][EvaluatedAnnotation.data_item_view_id].
66+
//
67+
// For false negative, there are zero or more predictions which are similar to
68+
// the only ground truth annotation in
69+
// [ground_truths][google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.ground_truths]
70+
// but not enough for a match.
71+
//
72+
// The schema of the prediction is stored in
73+
// [ModelEvaluation.annotation_schema_uri][]
74+
repeated google.protobuf.Value predictions = 2
75+
[(google.api.field_behavior) = OUTPUT_ONLY];
76+
77+
// Output only. The ground truth Annotations, i.e. the Annotations that exist
78+
// in the test data the Model is evaluated on.
79+
//
80+
// For true positive, there is one and only one ground truth annotation, which
81+
// matches the only prediction in
82+
// [predictions][google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.predictions].
83+
//
84+
// For false positive, there are zero or more ground truth annotations that
85+
// are similar to the only prediction in
86+
// [predictions][google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.predictions],
87+
// but not enough for a match.
88+
//
89+
// For false negative, there is one and only one ground truth annotation,
90+
// which doesn't match any predictions created by the model.
91+
//
92+
// The schema of the ground truth is stored in
93+
// [ModelEvaluation.annotation_schema_uri][]
94+
repeated google.protobuf.Value ground_truths = 3
95+
[(google.api.field_behavior) = OUTPUT_ONLY];
96+
97+
// Output only. The data item payload that the Model predicted this
98+
// EvaluatedAnnotation on.
99+
google.protobuf.Value data_item_payload = 5
100+
[(google.api.field_behavior) = OUTPUT_ONLY];
101+
102+
// Output only. ID of the EvaluatedDataItemView under the same ancestor
103+
// ModelEvaluation. The EvaluatedDataItemView consists of all ground truths
104+
// and predictions on
105+
// [data_item_payload][google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.data_item_payload].
106+
//
107+
// Can be passed in
108+
// [GetEvaluatedDataItemView's][ModelService.GetEvaluatedDataItemView][]
109+
// [id][GetEvaluatedDataItemViewRequest.id].
110+
string evaluated_data_item_view_id = 6
111+
[(google.api.field_behavior) = OUTPUT_ONLY];
112+
113+
// Explanations of
114+
// [predictions][google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.predictions].
115+
// Each element of the explanations indicates the explanation for one
116+
// explanation Method.
117+
//
118+
// The attributions list in the
119+
// [EvaluatedAnnotationExplanation.explanation][google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation.explanation]
120+
// object corresponds to the
121+
// [predictions][google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.predictions]
122+
// list. For example, the second element in the attributions list explains the
123+
// second element in the predictions list.
124+
repeated EvaluatedAnnotationExplanation explanations = 8;
125+
126+
// Annotations of model error analysis results.
127+
repeated ErrorAnalysisAnnotation error_analysis_annotations = 9;
128+
}
129+
130+
// Explanation result of the prediction produced by the Model.
131+
message EvaluatedAnnotationExplanation {
132+
// Explanation type.
133+
//
134+
// For AutoML Image Classification models, possible values are:
135+
//
136+
// * `image-integrated-gradients`
137+
// * `image-xrai`
138+
string explanation_type = 1;
139+
140+
// Explanation attribution response details.
141+
Explanation explanation = 2;
142+
}
143+
144+
// Model error analysis for each annotation.
145+
message ErrorAnalysisAnnotation {
146+
// Attributed items for a given annotation, typically representing neighbors
147+
// from the training sets constrained by the query type.
148+
message AttributedItem {
149+
// The unique ID for each annotation. Used by FE to allocate the annotation
150+
// in DB.
151+
string annotation_resource_name = 1;
152+
153+
// The distance of this item to the annotation.
154+
double distance = 2;
155+
}
156+
157+
// The query type used for finding the attributed items.
158+
enum QueryType {
159+
// Unspecified query type for model error analysis.
160+
QUERY_TYPE_UNSPECIFIED = 0;
161+
162+
// Query similar samples across all classes in the dataset.
163+
ALL_SIMILAR = 1;
164+
165+
// Query similar samples from the same class of the input sample.
166+
SAME_CLASS_SIMILAR = 2;
167+
168+
// Query dissimilar samples from the same class of the input sample.
169+
SAME_CLASS_DISSIMILAR = 3;
170+
}
171+
172+
// Attributed items for a given annotation, typically representing neighbors
173+
// from the training sets constrained by the query type.
174+
repeated AttributedItem attributed_items = 1;
175+
176+
// The query type used for finding the attributed items.
177+
QueryType query_type = 2;
178+
179+
// The outlier score of this annotated item. Usually defined as the min of all
180+
// distances from attributed items.
181+
double outlier_score = 3;
182+
183+
// The threshold used to determine if this annotation is an outlier or not.
184+
double outlier_threshold = 4;
185+
}

0 commit comments

Comments
 (0)