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