Skip to content

Commit 84720fb

Browse files
Google APIscopybara-github
authored andcommitted
feat: add successful_forecast_point_count to CompletionStats in aiplatform v1 completion_stats.proto
feat: add neighbors to Explanation in aiplatform v1 explanation.proto feat: add examples_override to ExplanationSpecOverride in aiplatform v1 explanation.proto feat: add version_id, version_aliases, version_create_time, version_update_time, and version_description to aiplatform v1 model.proto feat: add ModelVersion CRUD methods in aiplatform v1 model_service.proto feat: add model_id and parent_model to TrainingPipeline in aiplatform v1 training_pipeline.proto PiperOrigin-RevId: 453734478
1 parent a95a55f commit 84720fb

12 files changed

Lines changed: 323 additions & 3 deletions

google/cloud/aiplatform/v1/BUILD.bazel

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ proto_library(
5252
"explanation.proto",
5353
"explanation_metadata.proto",
5454
"feature.proto",
55-
"featurestore_monitoring.proto",
5655
"feature_monitoring_stats.proto",
5756
"feature_selector.proto",
5857
"featurestore.proto",
58+
"featurestore_monitoring.proto",
5959
"featurestore_online_service.proto",
6060
"featurestore_service.proto",
6161
"hyperparameter_tuning_job.proto",
@@ -125,6 +125,8 @@ proto_library_with_info(
125125
deps = [
126126
":aiplatform_proto",
127127
"//google/cloud:common_resources_proto",
128+
"//google/cloud/location:location_proto",
129+
"//google/iam/v1:iam_policy_proto",
128130
] + _PROTO_SUBPACKAGE_DEPS,
129131
)
130132

@@ -168,13 +170,19 @@ java_grpc_library(
168170
java_gapic_library(
169171
name = "aiplatform_java_gapic",
170172
srcs = [":aiplatform_proto_with_info"],
173+
gapic_yaml = "aiplatform_gapic.yaml",
171174
grpc_service_config = "aiplatform_grpc_service_config.json",
175+
service_yaml = "aiplatform_v1.yaml",
172176
test_deps = [
173177
":aiplatform_java_grpc",
178+
"//google/cloud/location:location_java_grpc",
179+
"//google/iam/v1:iam_java_grpc",
174180
] + _JAVA_PROTO_SUBPACKAGE_DEPS,
175181
deps = [
176182
":aiplatform_java_proto",
177183
"//google/api:api_java_proto",
184+
"//google/cloud/location:location_java_proto",
185+
"//google/iam/v1:iam_java_proto",
178186
] + _JAVA_PROTO_SUBPACKAGE_DEPS,
179187
)
180188

@@ -183,12 +191,19 @@ java_gapic_test(
183191
test_classes = [
184192
"com.google.cloud.aiplatform.v1.DatasetServiceClientTest",
185193
"com.google.cloud.aiplatform.v1.EndpointServiceClientTest",
194+
"com.google.cloud.aiplatform.v1.FeaturestoreOnlineServingServiceClientTest",
195+
"com.google.cloud.aiplatform.v1.FeaturestoreServiceClientTest",
196+
"com.google.cloud.aiplatform.v1.IndexEndpointServiceClientTest",
197+
"com.google.cloud.aiplatform.v1.IndexServiceClientTest",
186198
"com.google.cloud.aiplatform.v1.JobServiceClientTest",
199+
"com.google.cloud.aiplatform.v1.MetadataServiceClientTest",
187200
"com.google.cloud.aiplatform.v1.MigrationServiceClientTest",
188201
"com.google.cloud.aiplatform.v1.ModelServiceClientTest",
189202
"com.google.cloud.aiplatform.v1.PipelineServiceClientTest",
190203
"com.google.cloud.aiplatform.v1.PredictionServiceClientTest",
191204
"com.google.cloud.aiplatform.v1.SpecialistPoolServiceClientTest",
205+
"com.google.cloud.aiplatform.v1.TensorboardServiceClientTest",
206+
"com.google.cloud.aiplatform.v1.VizierServiceClientTest",
192207
],
193208
runtime_deps = [":aiplatform_java_gapic_test"],
194209
)
@@ -239,6 +254,8 @@ go_gapic_library(
239254
deps = [
240255
":aiplatform_go_proto",
241256
"//google/api:httpbody_go_proto",
257+
"//google/cloud/location:location_go_proto",
258+
"//google/iam/v1:iam_go_proto",
242259
"//google/longrunning:longrunning_go_proto",
243260
"@com_google_cloud_go//longrunning:go_default_library",
244261
"@com_google_cloud_go//longrunning/autogen:go_default_library",
@@ -285,6 +302,7 @@ py_gapic_library(
285302
name = "aiplatform_py_gapic",
286303
srcs = [":aiplatform_proto"],
287304
grpc_service_config = "aiplatform_grpc_service_config.json",
305+
service_yaml = "aiplatform_v1.yaml",
288306
)
289307

290308
# Open Source Packages
@@ -459,6 +477,7 @@ csharp_gapic_assembly_pkg(
459477
# srcs = [":aiplatform_proto_with_info"],
460478
# common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
461479
# grpc_service_config = "aiplatform_grpc_service_config.json",
480+
# service_yaml = "aiplatform_v1.yaml",
462481
# deps = [
463482
# ":aiplatform_csharp_grpc",
464483
# ":aiplatform_csharp_proto",

google/cloud/aiplatform/v1/aiplatform_v1.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ apis:
1919
- name: google.cloud.aiplatform.v1.SpecialistPoolService
2020
- name: google.cloud.aiplatform.v1.TensorboardService
2121
- name: google.cloud.aiplatform.v1.VizierService
22+
- name: google.cloud.location.Locations
23+
- name: google.iam.v1.IAMPolicy
24+
- name: google.longrunning.Operations
2225

2326
types:
2427
- name: google.cloud.aiplatform.v1.BatchCreateFeaturesOperationMetadata
@@ -101,6 +104,29 @@ documentation:
101104
- selector: google.cloud.location.Locations.ListLocations
102105
description: Lists information about the supported locations for this service.
103106

107+
- selector: google.iam.v1.IAMPolicy.GetIamPolicy
108+
description: |-
109+
Gets the access control policy for a resource. Returns an empty policy
110+
if the resource exists and does not have a policy set.
111+
112+
- selector: google.iam.v1.IAMPolicy.SetIamPolicy
113+
description: |-
114+
Sets the access control policy on the specified resource. Replaces
115+
any existing policy.
116+
117+
Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
118+
errors.
119+
120+
- selector: google.iam.v1.IAMPolicy.TestIamPermissions
121+
description: |-
122+
Returns permissions that a caller has on the specified resource. If the
123+
resource does not exist, this will return an empty set of
124+
permissions, not a `NOT_FOUND` error.
125+
126+
Note: This operation is designed to be used for building
127+
permission-aware UIs and command-line tools, not for authorization
128+
checking. This operation may "fail open" without warning.
129+
104130
backend:
105131
rules:
106132
- selector: 'google.cloud.aiplatform.v1.DatasetService.*'
@@ -141,6 +167,8 @@ backend:
141167
deadline: 30.0
142168
- selector: google.cloud.location.Locations.ListLocations
143169
deadline: 30.0
170+
- selector: 'google.iam.v1.IAMPolicy.*'
171+
deadline: 60.0
144172
- selector: 'google.longrunning.Operations.*'
145173
deadline: 60.0
146174

@@ -154,6 +182,20 @@ http:
154182
get: '/ui/{name=projects/*}/locations'
155183
additional_bindings:
156184
- get: '/v1/{name=projects/*}/locations'
185+
- selector: google.iam.v1.IAMPolicy.GetIamPolicy
186+
post: '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy'
187+
additional_bindings:
188+
- post: '/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy'
189+
- selector: google.iam.v1.IAMPolicy.SetIamPolicy
190+
post: '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy'
191+
body: '*'
192+
additional_bindings:
193+
- post: '/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy'
194+
body: '*'
195+
- selector: google.iam.v1.IAMPolicy.TestIamPermissions
196+
post: '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions'
197+
additional_bindings:
198+
- post: '/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions'
157199
- selector: google.longrunning.Operations.CancelOperation
158200
post: '/ui/{name=projects/*/locations/*/operations/*}:cancel'
159201
additional_bindings:
@@ -589,6 +631,10 @@ authentication:
589631
oauth:
590632
canonical_scopes: |-
591633
https://www.googleapis.com/auth/cloud-platform
634+
- selector: 'google.iam.v1.IAMPolicy.*'
635+
oauth:
636+
canonical_scopes: |-
637+
https://www.googleapis.com/auth/cloud-platform
592638
- selector: 'google.longrunning.Operations.*'
593639
oauth:
594640
canonical_scopes: |-

google/cloud/aiplatform/v1/batch_prediction_job.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@ message BatchPredictionJob {
159159
// Starting this job has no impact on any existing deployments of the Model
160160
// and their resources.
161161
// Exactly one of model and unmanaged_container_model must be set.
162+
//
163+
// The model resource name may contain version id or version alias to specify
164+
// the version, if no version is specified, the default version will be used.
162165
string model = 3 [(google.api.resource_reference) = {
163166
type: "aiplatform.googleapis.com/Model"
164167
}];

google/cloud/aiplatform/v1/completion_stats.proto

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,8 @@ message CompletionStats {
4141
// Set to -1 if the number is unknown (for example, the operation failed
4242
// before the total entity number could be collected).
4343
int64 incomplete_count = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
44+
45+
// Output only. The number of the successful forecast points that are generated by the
46+
// forecasting model. This is ONLY used by the forecasting batch prediction.
47+
int64 successful_forecast_point_count = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
4448
}

google/cloud/aiplatform/v1/endpoint.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ message DeployedModel {
156156

157157
// Required. The resource name of the Model that this is the deployment of. Note that
158158
// the Model may be in a different location than the DeployedModel's Endpoint.
159+
//
160+
// The resource name may contain version id or version alias to specify the
161+
// version, if no version is specified, the default version will be deployed.
159162
string model = 2 [
160163
(google.api.field_behavior) = REQUIRED,
161164
(google.api.resource_reference) = {

google/cloud/aiplatform/v1/explanation.proto

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ message Explanation {
4646
// the attributions are stored by [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] in the same
4747
// order as they appear in the output_indices.
4848
repeated Attribution attributions = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
49+
50+
// Output only. List of the nearest neighbors for example-based explanations.
51+
//
52+
// For models deployed with the examples explanations feature enabled, the
53+
// attributions field is empty and instead the neighbors field is populated.
54+
repeated Neighbor neighbors = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
4955
}
5056

5157
// Aggregated explanation metrics for a Model over a set of instances.
@@ -162,6 +168,15 @@ message Attribution {
162168
string output_name = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
163169
}
164170

171+
// Neighbors for example-based explanations.
172+
message Neighbor {
173+
// Output only. The neighbor id.
174+
string neighbor_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
175+
176+
// Output only. The neighbor distance.
177+
double neighbor_distance = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
178+
}
179+
165180
// Specification of Model explanation.
166181
message ExplanationSpec {
167182
// Required. Parameters that configure explaining of the Model's predictions.
@@ -375,6 +390,9 @@ message ExplanationSpecOverride {
375390

376391
// The metadata to be overridden. If not specified, no metadata is overridden.
377392
ExplanationMetadataOverride metadata = 2;
393+
394+
// The example-based explanations parameter overrides.
395+
ExamplesOverride examples_override = 3;
378396
}
379397

380398
// The [ExplanationMetadata][google.cloud.aiplatform.v1.ExplanationMetadata] entries that can be overridden at
@@ -399,3 +417,45 @@ message ExplanationMetadataOverride {
399417
// overridden.
400418
map<string, InputMetadataOverride> inputs = 1 [(google.api.field_behavior) = REQUIRED];
401419
}
420+
421+
// Overrides for example-based explanations.
422+
message ExamplesOverride {
423+
// Data format enum.
424+
enum DataFormat {
425+
// Unspecified format. Must not be used.
426+
DATA_FORMAT_UNSPECIFIED = 0;
427+
428+
// Provided data is a set of model inputs.
429+
INSTANCES = 1;
430+
431+
// Provided data is a set of embeddings.
432+
EMBEDDINGS = 2;
433+
}
434+
435+
// The number of neighbors to return.
436+
int32 neighbor_count = 1;
437+
438+
// The number of neighbors to return that have the same crowding tag.
439+
int32 crowding_count = 2;
440+
441+
// Restrict the resulting nearest neighbors to respect these constraints.
442+
repeated ExamplesRestrictionsNamespace restrictions = 3;
443+
444+
// If true, return the embeddings instead of neighbors.
445+
bool return_embeddings = 4;
446+
447+
// The format of the data being provided with each call.
448+
DataFormat data_format = 5;
449+
}
450+
451+
// Restrictions namespace for example-based explanations overrides.
452+
message ExamplesRestrictionsNamespace {
453+
// The namespace name.
454+
string namespace_name = 1;
455+
456+
// The list of allowed tags.
457+
repeated string allow = 2;
458+
459+
// The list of deny tags.
460+
repeated string deny = 3;
461+
}

google/cloud/aiplatform/v1/featurestore_online_service.proto

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ message StreamingReadFeatureValuesRequest {
171171
}
172172

173173
// Value for a feature.
174-
// (-- NEXT ID: 15 --)
175174
message FeatureValue {
176175
// Metadata of feature value.
177176
message Metadata {

google/cloud/aiplatform/v1/featurestore_service.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,7 @@ message UpdateFeaturestoreRequest {
418418
//
419419
// * `labels`
420420
// * `online_serving_config.fixed_node_count`
421+
// * `online_serving_config.scaling`
421422
google.protobuf.FieldMask update_mask = 2;
422423
}
423424

google/cloud/aiplatform/v1/model.proto

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,32 @@ message Model {
103103
// The resource name of the Model.
104104
string name = 1;
105105

106+
// Output only. Immutable. The version ID of the model.
107+
// A new version is committed when a new model version is uploaded or
108+
// trained under an existing model id. It is an auto-incrementing decimal
109+
// number in string representation.
110+
string version_id = 28 [
111+
(google.api.field_behavior) = IMMUTABLE,
112+
(google.api.field_behavior) = OUTPUT_ONLY
113+
];
114+
115+
// User provided version aliases so that a model version can be referenced via
116+
// alias (i.e.
117+
// projects/{project}/locations/{location}/models/{model_id}@{version_alias}
118+
// instead of auto-generated version id (i.e.
119+
// projects/{project}/locations/{location}/models/{model_id}@{version_id}).
120+
// The format is [a-z][a-zA-Z0-9-]{0,126}[a-z0-9] to distinguish from
121+
// version_id. A default version alias will be created for the first version
122+
// of the model, and there must be exactly one default version alias for a
123+
// model.
124+
repeated string version_aliases = 29;
125+
126+
// Output only. Timestamp when this version was created.
127+
google.protobuf.Timestamp version_create_time = 31 [(google.api.field_behavior) = OUTPUT_ONLY];
128+
129+
// Output only. Timestamp when this version was most recently updated.
130+
google.protobuf.Timestamp version_update_time = 32 [(google.api.field_behavior) = OUTPUT_ONLY];
131+
106132
// Required. The display name of the Model.
107133
// The name can be up to 128 characters long and can be consist of any UTF-8
108134
// characters.
@@ -111,6 +137,9 @@ message Model {
111137
// The description of the Model.
112138
string description = 3;
113139

140+
// The description of this version.
141+
string version_description = 30;
142+
114143
// The schemata that describe formats of the Model's predictions and
115144
// explanations as given and returned via
116145
// [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] and [PredictionService.Explain][google.cloud.aiplatform.v1.PredictionService.Explain].

0 commit comments

Comments
 (0)