1*d5c09012SAndroid Build Coastguard Worker// Copyright 2021 Google LLC 2*d5c09012SAndroid Build Coastguard Worker// 3*d5c09012SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License"); 4*d5c09012SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License. 5*d5c09012SAndroid Build Coastguard Worker// You may obtain a copy of the License at 6*d5c09012SAndroid Build Coastguard Worker// 7*d5c09012SAndroid Build Coastguard Worker// http://www.apache.org/licenses/LICENSE-2.0 8*d5c09012SAndroid Build Coastguard Worker// 9*d5c09012SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software 10*d5c09012SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS, 11*d5c09012SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12*d5c09012SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and 13*d5c09012SAndroid Build Coastguard Worker// limitations under the License. 14*d5c09012SAndroid Build Coastguard Worker 15*d5c09012SAndroid Build Coastguard Workersyntax = "proto3"; 16*d5c09012SAndroid Build Coastguard Worker 17*d5c09012SAndroid Build Coastguard Workerpackage google.cloud.automl.v1; 18*d5c09012SAndroid Build Coastguard Worker 19*d5c09012SAndroid Build Coastguard Workerimport "google/api/field_behavior.proto"; 20*d5c09012SAndroid Build Coastguard Workerimport "google/cloud/automl/v1/classification.proto"; 21*d5c09012SAndroid Build Coastguard Worker 22*d5c09012SAndroid Build Coastguard Workeroption csharp_namespace = "Google.Cloud.AutoML.V1"; 23*d5c09012SAndroid Build Coastguard Workeroption go_package = "cloud.google.com/go/automl/apiv1/automlpb;automlpb"; 24*d5c09012SAndroid Build Coastguard Workeroption java_multiple_files = true; 25*d5c09012SAndroid Build Coastguard Workeroption java_outer_classname = "ImageProto"; 26*d5c09012SAndroid Build Coastguard Workeroption java_package = "com.google.cloud.automl.v1"; 27*d5c09012SAndroid Build Coastguard Workeroption php_namespace = "Google\\Cloud\\AutoMl\\V1"; 28*d5c09012SAndroid Build Coastguard Workeroption ruby_package = "Google::Cloud::AutoML::V1"; 29*d5c09012SAndroid Build Coastguard Worker 30*d5c09012SAndroid Build Coastguard Worker// Dataset metadata that is specific to image classification. 31*d5c09012SAndroid Build Coastguard Workermessage ImageClassificationDatasetMetadata { 32*d5c09012SAndroid Build Coastguard Worker // Required. Type of the classification problem. 33*d5c09012SAndroid Build Coastguard Worker ClassificationType classification_type = 1 [(google.api.field_behavior) = REQUIRED]; 34*d5c09012SAndroid Build Coastguard Worker} 35*d5c09012SAndroid Build Coastguard Worker 36*d5c09012SAndroid Build Coastguard Worker// Dataset metadata specific to image object detection. 37*d5c09012SAndroid Build Coastguard Workermessage ImageObjectDetectionDatasetMetadata { 38*d5c09012SAndroid Build Coastguard Worker 39*d5c09012SAndroid Build Coastguard Worker} 40*d5c09012SAndroid Build Coastguard Worker 41*d5c09012SAndroid Build Coastguard Worker// Model metadata for image classification. 42*d5c09012SAndroid Build Coastguard Workermessage ImageClassificationModelMetadata { 43*d5c09012SAndroid Build Coastguard Worker // Optional. The ID of the `base` model. If it is specified, the new model 44*d5c09012SAndroid Build Coastguard Worker // will be created based on the `base` model. Otherwise, the new model will be 45*d5c09012SAndroid Build Coastguard Worker // created from scratch. The `base` model must be in the same 46*d5c09012SAndroid Build Coastguard Worker // `project` and `location` as the new model to create, and have the same 47*d5c09012SAndroid Build Coastguard Worker // `model_type`. 48*d5c09012SAndroid Build Coastguard Worker string base_model_id = 1 [(google.api.field_behavior) = OPTIONAL]; 49*d5c09012SAndroid Build Coastguard Worker 50*d5c09012SAndroid Build Coastguard Worker // Optional. The train budget of creating this model, expressed in milli node 51*d5c09012SAndroid Build Coastguard Worker // hours i.e. 1,000 value in this field means 1 node hour. The actual 52*d5c09012SAndroid Build Coastguard Worker // `train_cost` will be equal or less than this value. If further model 53*d5c09012SAndroid Build Coastguard Worker // training ceases to provide any improvements, it will stop without using 54*d5c09012SAndroid Build Coastguard Worker // full budget and the stop_reason will be `MODEL_CONVERGED`. 55*d5c09012SAndroid Build Coastguard Worker // Note, node_hour = actual_hour * number_of_nodes_invovled. 56*d5c09012SAndroid Build Coastguard Worker // For model type `cloud`(default), the train budget must be between 8,000 57*d5c09012SAndroid Build Coastguard Worker // and 800,000 milli node hours, inclusive. The default value is 192, 000 58*d5c09012SAndroid Build Coastguard Worker // which represents one day in wall time. For model type 59*d5c09012SAndroid Build Coastguard Worker // `mobile-low-latency-1`, `mobile-versatile-1`, `mobile-high-accuracy-1`, 60*d5c09012SAndroid Build Coastguard Worker // `mobile-core-ml-low-latency-1`, `mobile-core-ml-versatile-1`, 61*d5c09012SAndroid Build Coastguard Worker // `mobile-core-ml-high-accuracy-1`, the train budget must be between 1,000 62*d5c09012SAndroid Build Coastguard Worker // and 100,000 milli node hours, inclusive. The default value is 24, 000 which 63*d5c09012SAndroid Build Coastguard Worker // represents one day in wall time. 64*d5c09012SAndroid Build Coastguard Worker int64 train_budget_milli_node_hours = 16 [(google.api.field_behavior) = OPTIONAL]; 65*d5c09012SAndroid Build Coastguard Worker 66*d5c09012SAndroid Build Coastguard Worker // Output only. The actual train cost of creating this model, expressed in 67*d5c09012SAndroid Build Coastguard Worker // milli node hours, i.e. 1,000 value in this field means 1 node hour. 68*d5c09012SAndroid Build Coastguard Worker // Guaranteed to not exceed the train budget. 69*d5c09012SAndroid Build Coastguard Worker int64 train_cost_milli_node_hours = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; 70*d5c09012SAndroid Build Coastguard Worker 71*d5c09012SAndroid Build Coastguard Worker // Output only. The reason that this create model operation stopped, 72*d5c09012SAndroid Build Coastguard Worker // e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`. 73*d5c09012SAndroid Build Coastguard Worker string stop_reason = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; 74*d5c09012SAndroid Build Coastguard Worker 75*d5c09012SAndroid Build Coastguard Worker // Optional. Type of the model. The available values are: 76*d5c09012SAndroid Build Coastguard Worker // * `cloud` - Model to be used via prediction calls to AutoML API. 77*d5c09012SAndroid Build Coastguard Worker // This is the default value. 78*d5c09012SAndroid Build Coastguard Worker // * `mobile-low-latency-1` - A model that, in addition to providing 79*d5c09012SAndroid Build Coastguard Worker // prediction via AutoML API, can also be exported (see 80*d5c09012SAndroid Build Coastguard Worker // [AutoMl.ExportModel][google.cloud.automl.v1.AutoMl.ExportModel]) and used on a mobile or edge device 81*d5c09012SAndroid Build Coastguard Worker // with TensorFlow afterwards. Expected to have low latency, but 82*d5c09012SAndroid Build Coastguard Worker // may have lower prediction quality than other models. 83*d5c09012SAndroid Build Coastguard Worker // * `mobile-versatile-1` - A model that, in addition to providing 84*d5c09012SAndroid Build Coastguard Worker // prediction via AutoML API, can also be exported (see 85*d5c09012SAndroid Build Coastguard Worker // [AutoMl.ExportModel][google.cloud.automl.v1.AutoMl.ExportModel]) and used on a mobile or edge device 86*d5c09012SAndroid Build Coastguard Worker // with TensorFlow afterwards. 87*d5c09012SAndroid Build Coastguard Worker // * `mobile-high-accuracy-1` - A model that, in addition to providing 88*d5c09012SAndroid Build Coastguard Worker // prediction via AutoML API, can also be exported (see 89*d5c09012SAndroid Build Coastguard Worker // [AutoMl.ExportModel][google.cloud.automl.v1.AutoMl.ExportModel]) and used on a mobile or edge device 90*d5c09012SAndroid Build Coastguard Worker // with TensorFlow afterwards. Expected to have a higher 91*d5c09012SAndroid Build Coastguard Worker // latency, but should also have a higher prediction quality 92*d5c09012SAndroid Build Coastguard Worker // than other models. 93*d5c09012SAndroid Build Coastguard Worker // * `mobile-core-ml-low-latency-1` - A model that, in addition to providing 94*d5c09012SAndroid Build Coastguard Worker // prediction via AutoML API, can also be exported (see 95*d5c09012SAndroid Build Coastguard Worker // [AutoMl.ExportModel][google.cloud.automl.v1.AutoMl.ExportModel]) and used on a mobile device with Core 96*d5c09012SAndroid Build Coastguard Worker // ML afterwards. Expected to have low latency, but may have 97*d5c09012SAndroid Build Coastguard Worker // lower prediction quality than other models. 98*d5c09012SAndroid Build Coastguard Worker // * `mobile-core-ml-versatile-1` - A model that, in addition to providing 99*d5c09012SAndroid Build Coastguard Worker // prediction via AutoML API, can also be exported (see 100*d5c09012SAndroid Build Coastguard Worker // [AutoMl.ExportModel][google.cloud.automl.v1.AutoMl.ExportModel]) and used on a mobile device with Core 101*d5c09012SAndroid Build Coastguard Worker // ML afterwards. 102*d5c09012SAndroid Build Coastguard Worker // * `mobile-core-ml-high-accuracy-1` - A model that, in addition to 103*d5c09012SAndroid Build Coastguard Worker // providing prediction via AutoML API, can also be exported 104*d5c09012SAndroid Build Coastguard Worker // (see [AutoMl.ExportModel][google.cloud.automl.v1.AutoMl.ExportModel]) and used on a mobile device with 105*d5c09012SAndroid Build Coastguard Worker // Core ML afterwards. Expected to have a higher latency, but 106*d5c09012SAndroid Build Coastguard Worker // should also have a higher prediction quality than other 107*d5c09012SAndroid Build Coastguard Worker // models. 108*d5c09012SAndroid Build Coastguard Worker string model_type = 7 [(google.api.field_behavior) = OPTIONAL]; 109*d5c09012SAndroid Build Coastguard Worker 110*d5c09012SAndroid Build Coastguard Worker // Output only. An approximate number of online prediction QPS that can 111*d5c09012SAndroid Build Coastguard Worker // be supported by this model per each node on which it is deployed. 112*d5c09012SAndroid Build Coastguard Worker double node_qps = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; 113*d5c09012SAndroid Build Coastguard Worker 114*d5c09012SAndroid Build Coastguard Worker // Output only. The number of nodes this model is deployed on. A node is an 115*d5c09012SAndroid Build Coastguard Worker // abstraction of a machine resource, which can handle online prediction QPS 116*d5c09012SAndroid Build Coastguard Worker // as given in the node_qps field. 117*d5c09012SAndroid Build Coastguard Worker int64 node_count = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; 118*d5c09012SAndroid Build Coastguard Worker} 119*d5c09012SAndroid Build Coastguard Worker 120*d5c09012SAndroid Build Coastguard Worker// Model metadata specific to image object detection. 121*d5c09012SAndroid Build Coastguard Workermessage ImageObjectDetectionModelMetadata { 122*d5c09012SAndroid Build Coastguard Worker // Optional. Type of the model. The available values are: 123*d5c09012SAndroid Build Coastguard Worker // * `cloud-high-accuracy-1` - (default) A model to be used via prediction 124*d5c09012SAndroid Build Coastguard Worker // calls to AutoML API. Expected to have a higher latency, but 125*d5c09012SAndroid Build Coastguard Worker // should also have a higher prediction quality than other 126*d5c09012SAndroid Build Coastguard Worker // models. 127*d5c09012SAndroid Build Coastguard Worker // * `cloud-low-latency-1` - A model to be used via prediction 128*d5c09012SAndroid Build Coastguard Worker // calls to AutoML API. Expected to have low latency, but may 129*d5c09012SAndroid Build Coastguard Worker // have lower prediction quality than other models. 130*d5c09012SAndroid Build Coastguard Worker // * `mobile-low-latency-1` - A model that, in addition to providing 131*d5c09012SAndroid Build Coastguard Worker // prediction via AutoML API, can also be exported (see 132*d5c09012SAndroid Build Coastguard Worker // [AutoMl.ExportModel][google.cloud.automl.v1.AutoMl.ExportModel]) and used on a mobile or edge device 133*d5c09012SAndroid Build Coastguard Worker // with TensorFlow afterwards. Expected to have low latency, but 134*d5c09012SAndroid Build Coastguard Worker // may have lower prediction quality than other models. 135*d5c09012SAndroid Build Coastguard Worker // * `mobile-versatile-1` - A model that, in addition to providing 136*d5c09012SAndroid Build Coastguard Worker // prediction via AutoML API, can also be exported (see 137*d5c09012SAndroid Build Coastguard Worker // [AutoMl.ExportModel][google.cloud.automl.v1.AutoMl.ExportModel]) and used on a mobile or edge device 138*d5c09012SAndroid Build Coastguard Worker // with TensorFlow afterwards. 139*d5c09012SAndroid Build Coastguard Worker // * `mobile-high-accuracy-1` - A model that, in addition to providing 140*d5c09012SAndroid Build Coastguard Worker // prediction via AutoML API, can also be exported (see 141*d5c09012SAndroid Build Coastguard Worker // [AutoMl.ExportModel][google.cloud.automl.v1.AutoMl.ExportModel]) and used on a mobile or edge device 142*d5c09012SAndroid Build Coastguard Worker // with TensorFlow afterwards. Expected to have a higher 143*d5c09012SAndroid Build Coastguard Worker // latency, but should also have a higher prediction quality 144*d5c09012SAndroid Build Coastguard Worker // than other models. 145*d5c09012SAndroid Build Coastguard Worker string model_type = 1 [(google.api.field_behavior) = OPTIONAL]; 146*d5c09012SAndroid Build Coastguard Worker 147*d5c09012SAndroid Build Coastguard Worker // Output only. The number of nodes this model is deployed on. A node is an 148*d5c09012SAndroid Build Coastguard Worker // abstraction of a machine resource, which can handle online prediction QPS 149*d5c09012SAndroid Build Coastguard Worker // as given in the qps_per_node field. 150*d5c09012SAndroid Build Coastguard Worker int64 node_count = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; 151*d5c09012SAndroid Build Coastguard Worker 152*d5c09012SAndroid Build Coastguard Worker // Output only. An approximate number of online prediction QPS that can 153*d5c09012SAndroid Build Coastguard Worker // be supported by this model per each node on which it is deployed. 154*d5c09012SAndroid Build Coastguard Worker double node_qps = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; 155*d5c09012SAndroid Build Coastguard Worker 156*d5c09012SAndroid Build Coastguard Worker // Output only. The reason that this create model operation stopped, 157*d5c09012SAndroid Build Coastguard Worker // e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`. 158*d5c09012SAndroid Build Coastguard Worker string stop_reason = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; 159*d5c09012SAndroid Build Coastguard Worker 160*d5c09012SAndroid Build Coastguard Worker // Optional. The train budget of creating this model, expressed in milli node 161*d5c09012SAndroid Build Coastguard Worker // hours i.e. 1,000 value in this field means 1 node hour. The actual 162*d5c09012SAndroid Build Coastguard Worker // `train_cost` will be equal or less than this value. If further model 163*d5c09012SAndroid Build Coastguard Worker // training ceases to provide any improvements, it will stop without using 164*d5c09012SAndroid Build Coastguard Worker // full budget and the stop_reason will be `MODEL_CONVERGED`. 165*d5c09012SAndroid Build Coastguard Worker // Note, node_hour = actual_hour * number_of_nodes_invovled. 166*d5c09012SAndroid Build Coastguard Worker // For model type `cloud-high-accuracy-1`(default) and `cloud-low-latency-1`, 167*d5c09012SAndroid Build Coastguard Worker // the train budget must be between 20,000 and 900,000 milli node hours, 168*d5c09012SAndroid Build Coastguard Worker // inclusive. The default value is 216, 000 which represents one day in 169*d5c09012SAndroid Build Coastguard Worker // wall time. 170*d5c09012SAndroid Build Coastguard Worker // For model type `mobile-low-latency-1`, `mobile-versatile-1`, 171*d5c09012SAndroid Build Coastguard Worker // `mobile-high-accuracy-1`, `mobile-core-ml-low-latency-1`, 172*d5c09012SAndroid Build Coastguard Worker // `mobile-core-ml-versatile-1`, `mobile-core-ml-high-accuracy-1`, the train 173*d5c09012SAndroid Build Coastguard Worker // budget must be between 1,000 and 100,000 milli node hours, inclusive. 174*d5c09012SAndroid Build Coastguard Worker // The default value is 24, 000 which represents one day in wall time. 175*d5c09012SAndroid Build Coastguard Worker int64 train_budget_milli_node_hours = 6 [(google.api.field_behavior) = OPTIONAL]; 176*d5c09012SAndroid Build Coastguard Worker 177*d5c09012SAndroid Build Coastguard Worker // Output only. The actual train cost of creating this model, expressed in 178*d5c09012SAndroid Build Coastguard Worker // milli node hours, i.e. 1,000 value in this field means 1 node hour. 179*d5c09012SAndroid Build Coastguard Worker // Guaranteed to not exceed the train budget. 180*d5c09012SAndroid Build Coastguard Worker int64 train_cost_milli_node_hours = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; 181*d5c09012SAndroid Build Coastguard Worker} 182*d5c09012SAndroid Build Coastguard Worker 183*d5c09012SAndroid Build Coastguard Worker// Model deployment metadata specific to Image Classification. 184*d5c09012SAndroid Build Coastguard Workermessage ImageClassificationModelDeploymentMetadata { 185*d5c09012SAndroid Build Coastguard Worker // Input only. The number of nodes to deploy the model on. A node is an 186*d5c09012SAndroid Build Coastguard Worker // abstraction of a machine resource, which can handle online prediction QPS 187*d5c09012SAndroid Build Coastguard Worker // as given in the model's 188*d5c09012SAndroid Build Coastguard Worker // [node_qps][google.cloud.automl.v1.ImageClassificationModelMetadata.node_qps]. 189*d5c09012SAndroid Build Coastguard Worker // Must be between 1 and 100, inclusive on both ends. 190*d5c09012SAndroid Build Coastguard Worker int64 node_count = 1 [(google.api.field_behavior) = INPUT_ONLY]; 191*d5c09012SAndroid Build Coastguard Worker} 192*d5c09012SAndroid Build Coastguard Worker 193*d5c09012SAndroid Build Coastguard Worker// Model deployment metadata specific to Image Object Detection. 194*d5c09012SAndroid Build Coastguard Workermessage ImageObjectDetectionModelDeploymentMetadata { 195*d5c09012SAndroid Build Coastguard Worker // Input only. The number of nodes to deploy the model on. A node is an 196*d5c09012SAndroid Build Coastguard Worker // abstraction of a machine resource, which can handle online prediction QPS 197*d5c09012SAndroid Build Coastguard Worker // as given in the model's 198*d5c09012SAndroid Build Coastguard Worker // [qps_per_node][google.cloud.automl.v1.ImageObjectDetectionModelMetadata.qps_per_node]. 199*d5c09012SAndroid Build Coastguard Worker // Must be between 1 and 100, inclusive on both ends. 200*d5c09012SAndroid Build Coastguard Worker int64 node_count = 1 [(google.api.field_behavior) = INPUT_ONLY]; 201*d5c09012SAndroid Build Coastguard Worker} 202