Skip to content

Commit

Permalink
feat: publish updated protos for cloud/automl/v1 service
Browse files Browse the repository at this point in the history
fix!: One of the fields now have field_behavior as REQUIRED in cloud/automl/v1 service definition.

Committer: @hkdevandla
PiperOrigin-RevId: 421156406
  • Loading branch information
Google APIs authored and Copybara-Service committed Jan 12, 2022
1 parent ef417dc commit 05b24d8
Show file tree
Hide file tree
Showing 20 changed files with 126 additions and 155 deletions.
4 changes: 2 additions & 2 deletions google/cloud/automl/v1/annotation_payload.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 @@ -58,7 +58,7 @@ message AnnotationPayload {
string annotation_spec_id = 1;

// Output only. The value of
// [display_name][google.cloud.automl.v1.AnnotationSpec.display_name]
// [display_name][google.cloud.automl.v1p1beta.AnnotationSpec.display_name]
// when the model was trained. Because this field returns a value at model
// training time, for different models trained using the same dataset, the
// returned value could be different as model owner could update the
Expand Down
3 changes: 1 addition & 2 deletions google/cloud/automl/v1/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 @@ -35,7 +35,6 @@ message AnnotationSpec {

// Output only. Resource name of the annotation spec.
// Form:
//
// 'projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationSpecs/{annotation_spec_id}'
string name = 1;

Expand Down
72 changes: 49 additions & 23 deletions google/cloud/automl/v1/automl_v1.yaml
Expand Up @@ -22,6 +22,12 @@ documentation:
state-of-the-art transfer learning, and Neural Architecture Search
technology.
rules:
- selector: google.cloud.location.Locations.GetLocation
description: Gets information about a location.

- selector: google.cloud.location.Locations.ListLocations
description: Lists information about the supported locations for this service.

- selector: google.iam.v1.IAMPolicy.GetIamPolicy
description: |-
Gets the access control policy for a resource. Returns an empty policy
Expand All @@ -32,14 +38,14 @@ documentation:
Sets the access control policy on the specified resource. Replaces
any existing policy.
Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and
PERMISSION_DENIED
Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
errors.
- selector: google.iam.v1.IAMPolicy.TestIamPermissions
description: |-
Returns permissions that a caller has on the specified resource. If the
resource does not exist, this will return an empty set of
permissions, not a NOT_FOUND error.
permissions, not a `NOT_FOUND` error.
Note: This operation is designed to be used for building
permission-aware UIs and command-line tools, not for authorization
Expand All @@ -51,6 +57,10 @@ backend:
deadline: 5.0
- selector: google.cloud.automl.v1.AutoMl.CreateModel
deadline: 20.0
- selector: google.cloud.automl.v1.AutoMl.DeployModel
deadline: 20.0
- selector: google.cloud.automl.v1.AutoMl.ExportData
deadline: 20.0
- selector: google.cloud.automl.v1.AutoMl.ImportData
deadline: 20.0
- selector: google.cloud.automl.v1.AutoMl.ListDatasets
Expand All @@ -63,6 +73,10 @@ backend:
deadline: 20.0
- selector: google.cloud.automl.v1.PredictionService.Predict
deadline: 60.0
- selector: google.cloud.location.Locations.GetLocation
deadline: 5.0
- selector: google.cloud.location.Locations.ListLocations
deadline: 5.0
- selector: 'google.iam.v1.IAMPolicy.*'
deadline: 5.0
- selector: 'google.longrunning.Operations.*'
Expand All @@ -74,34 +88,38 @@ backend:

http:
rules:
- selector: google.longrunning.Operations.ListOperations
get: '/v1/{name=projects/*/locations/*}/operations'

- selector: google.longrunning.Operations.GetOperation
get: '/v1/{name=projects/*/locations/*/operations/*}'

- selector: google.longrunning.Operations.DeleteOperation
delete: '/v1/{name=projects/*/locations/*/operations/*}'

- selector: google.longrunning.Operations.CancelOperation
post: '/v1/{name=projects/*/locations/*/operations/*}:cancel'
body: '*'

- selector: google.cloud.location.Locations.GetLocation
get: '/v1/{name=projects/*/locations/*}'
- selector: google.cloud.location.Locations.ListLocations
get: '/v1/{name=projects/*}/locations'
- selector: google.iam.v1.IAMPolicy.GetIamPolicy
get: '/v1/{resource=projects/*/locations/*}:getIamPolicy'
additional_bindings:
- get: '/v1/{resource=projects/*/locations/*/datasets/*}:getIamPolicy'
- get: '/v1/{resource=projects/*/locations/*/models/*}:getIamPolicy'
- selector: google.iam.v1.IAMPolicy.SetIamPolicy
post: '/v1/{resource=projects/*/locations/*/datasets/*}:setIamPolicy'
post: '/v1/{resource=projects/*/locations/*}:setIamPolicy'
body: '*'
additional_bindings:
- post: '/v1/{resource=projects/*/locations/*/datasets/*}:setIamPolicy'
body: '*'
- post: '/v1/{resource=projects/*/locations/*/models/*}:setIamPolicy'
body: '*'

- selector: google.iam.v1.IAMPolicy.GetIamPolicy
get: '/v1/{resource=projects/*/locations/*/datasets/*}:getIamPolicy'
additional_bindings:
- get: '/v1/{resource=projects/*/locations/*/models/*}:getIamPolicy'

- selector: google.iam.v1.IAMPolicy.TestIamPermissions
post: '/v1/{resource=projects/*/locations/*/**}:testIamPermissions'
body: '*'
- selector: google.longrunning.Operations.CancelOperation
post: '/v1/{name=projects/*/locations/*/operations/*}:cancel'
body: '*'
- selector: google.longrunning.Operations.DeleteOperation
delete: '/v1/{name=projects/*/locations/*/operations/*}'
- selector: google.longrunning.Operations.GetOperation
get: '/v1/{name=projects/*/locations/*/operations/*}'
- selector: google.longrunning.Operations.ListOperations
get: '/v1/{name=projects/*/locations/*}/operations'
- selector: google.longrunning.Operations.WaitOperation
post: '/v1/{name=projects/*/locations/*/operations/*}:wait'
body: '*'

authentication:
rules:
Expand All @@ -117,6 +135,14 @@ authentication:
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
- selector: google.cloud.location.Locations.GetLocation
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
- selector: google.cloud.location.Locations.ListLocations
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
- selector: 'google.iam.v1.IAMPolicy.*'
oauth:
canonical_scopes: |-
Expand Down
4 changes: 1 addition & 3 deletions google/cloud/automl/v1/classification.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 @@ -124,15 +124,13 @@ message ClassificationEvaluationMetrics {

// Output only. IDs of the annotation specs used in the confusion matrix.
// For Tables CLASSIFICATION
//
// [prediction_type][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type]
// only list of [annotation_spec_display_name-s][] is populated.
repeated string annotation_spec_id = 1;

// Output only. Display name of the annotation specs used in the confusion
// matrix, as they were at the moment of the evaluation. For Tables
// CLASSIFICATION
//
// [prediction_type-s][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type],
// distinct values of the target column at the moment of the model
// evaluation are populated here.
Expand Down
3 changes: 1 addition & 2 deletions google/cloud/automl/v1/data_items.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 @@ -146,7 +146,6 @@ message Document {

// The position of the [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in the page.
// Contains exactly 4
//
// [normalized_vertices][google.cloud.automl.v1p1beta.BoundingPoly.normalized_vertices]
// and they are connected by edges in the order provided, which will
// represent a rectangle parallel to the frame. The
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/automl/v1/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
2 changes: 1 addition & 1 deletion google/cloud/automl/v1/detection.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/automl/v1/geometry.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
41 changes: 20 additions & 21 deletions google/cloud/automl/v1/image.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 @@ -16,6 +16,7 @@ syntax = "proto3";

package google.cloud.automl.v1;

import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/automl/v1/annotation_spec.proto";
import "google/cloud/automl/v1/classification.proto";
Expand All @@ -33,7 +34,7 @@ option ruby_package = "Google::Cloud::AutoML::V1";
// Dataset metadata that is specific to image classification.
message ImageClassificationDatasetMetadata {
// Required. Type of the classification problem.
ClassificationType classification_type = 1;
ClassificationType classification_type = 1 [(google.api.field_behavior) = REQUIRED];
}

// Dataset metadata specific to image object detection.
Expand All @@ -48,9 +49,9 @@ message ImageClassificationModelMetadata {
// created from scratch. The `base` model must be in the same
// `project` and `location` as the new model to create, and have the same
// `model_type`.
string base_model_id = 1;
string base_model_id = 1 [(google.api.field_behavior) = OPTIONAL];

// The train budget of creating this model, expressed in milli node
// Optional. The train budget of creating this model, expressed in milli node
// hours i.e. 1,000 value in this field means 1 node hour. The actual
// `train_cost` will be equal or less than this value. If further model
// training ceases to provide any improvements, it will stop without using
Expand All @@ -64,16 +65,16 @@ message ImageClassificationModelMetadata {
// `mobile-core-ml-high-accuracy-1`, the train budget must be between 1,000
// and 100,000 milli node hours, inclusive. The default value is 24, 000 which
// represents one day in wall time.
int64 train_budget_milli_node_hours = 16;
int64 train_budget_milli_node_hours = 16 [(google.api.field_behavior) = OPTIONAL];

// Output only. The actual train cost of creating this model, expressed in
// milli node hours, i.e. 1,000 value in this field means 1 node hour.
// Guaranteed to not exceed the train budget.
int64 train_cost_milli_node_hours = 17;
int64 train_cost_milli_node_hours = 17 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The reason that this create model operation stopped,
// e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`.
string stop_reason = 5;
string stop_reason = 5 [(google.api.field_behavior) = OUTPUT_ONLY];

// Optional. Type of the model. The available values are:
// * `cloud` - Model to be used via prediction calls to AutoML API.
Expand Down Expand Up @@ -108,16 +109,16 @@ message ImageClassificationModelMetadata {
// Core ML afterwards. Expected to have a higher latency, but
// should also have a higher prediction quality than other
// models.
string model_type = 7;
string model_type = 7 [(google.api.field_behavior) = OPTIONAL];

// Output only. An approximate number of online prediction QPS that can
// be supported by this model per each node on which it is deployed.
double node_qps = 13;
double node_qps = 13 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The number of nodes this model is deployed on. A node is an
// abstraction of a machine resource, which can handle online prediction QPS
// as given in the node_qps field.
int64 node_count = 14;
int64 node_count = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Model metadata specific to image object detection.
Expand Down Expand Up @@ -145,22 +146,22 @@ message ImageObjectDetectionModelMetadata {
// with TensorFlow afterwards. Expected to have a higher
// latency, but should also have a higher prediction quality
// than other models.
string model_type = 1;
string model_type = 1 [(google.api.field_behavior) = OPTIONAL];

// Output only. The number of nodes this model is deployed on. A node is an
// abstraction of a machine resource, which can handle online prediction QPS
// as given in the qps_per_node field.
int64 node_count = 3;
int64 node_count = 3 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. An approximate number of online prediction QPS that can
// be supported by this model per each node on which it is deployed.
double node_qps = 4;
double node_qps = 4 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The reason that this create model operation stopped,
// e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`.
string stop_reason = 5;
string stop_reason = 5 [(google.api.field_behavior) = OUTPUT_ONLY];

// The train budget of creating this model, expressed in milli node
// Optional. The train budget of creating this model, expressed in milli node
// hours i.e. 1,000 value in this field means 1 node hour. The actual
// `train_cost` will be equal or less than this value. If further model
// training ceases to provide any improvements, it will stop without using
Expand All @@ -175,32 +176,30 @@ message ImageObjectDetectionModelMetadata {
// `mobile-core-ml-versatile-1`, `mobile-core-ml-high-accuracy-1`, the train
// budget must be between 1,000 and 100,000 milli node hours, inclusive.
// The default value is 24, 000 which represents one day in wall time.
int64 train_budget_milli_node_hours = 6;
int64 train_budget_milli_node_hours = 6 [(google.api.field_behavior) = OPTIONAL];

// Output only. The actual train cost of creating this model, expressed in
// milli node hours, i.e. 1,000 value in this field means 1 node hour.
// Guaranteed to not exceed the train budget.
int64 train_cost_milli_node_hours = 7;
int64 train_cost_milli_node_hours = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Model deployment metadata specific to Image Classification.
message ImageClassificationModelDeploymentMetadata {
// Input only. The number of nodes to deploy the model on. A node is an
// abstraction of a machine resource, which can handle online prediction QPS
// as given in the model's
//
// [node_qps][google.cloud.automl.v1.ImageClassificationModelMetadata.node_qps].
// Must be between 1 and 100, inclusive on both ends.
int64 node_count = 1;
int64 node_count = 1 [(google.api.field_behavior) = INPUT_ONLY];
}

// Model deployment metadata specific to Image Object Detection.
message ImageObjectDetectionModelDeploymentMetadata {
// Input only. The number of nodes to deploy the model on. A node is an
// abstraction of a machine resource, which can handle online prediction QPS
// as given in the model's
//
// [qps_per_node][google.cloud.automl.v1.ImageObjectDetectionModelMetadata.qps_per_node].
// Must be between 1 and 100, inclusive on both ends.
int64 node_count = 1;
int64 node_count = 1 [(google.api.field_behavior) = INPUT_ONLY];
}

0 comments on commit 05b24d8

Please sign in to comment.