model.proto 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. // Copyright 2020 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. syntax = "proto3";
  15. package google.cloud.automl.v1beta1;
  16. import "google/api/resource.proto";
  17. import "google/cloud/automl/v1beta1/image.proto";
  18. import "google/cloud/automl/v1beta1/tables.proto";
  19. import "google/cloud/automl/v1beta1/text.proto";
  20. import "google/cloud/automl/v1beta1/translation.proto";
  21. import "google/cloud/automl/v1beta1/video.proto";
  22. import "google/protobuf/timestamp.proto";
  23. import "google/api/annotations.proto";
  24. option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
  25. option java_multiple_files = true;
  26. option java_package = "com.google.cloud.automl.v1beta1";
  27. option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
  28. option ruby_package = "Google::Cloud::AutoML::V1beta1";
  29. // API proto representing a trained machine learning model.
  30. message Model {
  31. option (google.api.resource) = {
  32. type: "automl.googleapis.com/Model"
  33. pattern: "projects/{project}/locations/{location}/models/{model}"
  34. };
  35. // Deployment state of the model.
  36. enum DeploymentState {
  37. // Should not be used, an un-set enum has this value by default.
  38. DEPLOYMENT_STATE_UNSPECIFIED = 0;
  39. // Model is deployed.
  40. DEPLOYED = 1;
  41. // Model is not deployed.
  42. UNDEPLOYED = 2;
  43. }
  44. // Required.
  45. // The model metadata that is specific to the problem type.
  46. // Must match the metadata type of the dataset used to train the model.
  47. oneof model_metadata {
  48. // Metadata for translation models.
  49. TranslationModelMetadata translation_model_metadata = 15;
  50. // Metadata for image classification models.
  51. ImageClassificationModelMetadata image_classification_model_metadata = 13;
  52. // Metadata for text classification models.
  53. TextClassificationModelMetadata text_classification_model_metadata = 14;
  54. // Metadata for image object detection models.
  55. ImageObjectDetectionModelMetadata image_object_detection_model_metadata = 20;
  56. // Metadata for video classification models.
  57. VideoClassificationModelMetadata video_classification_model_metadata = 23;
  58. // Metadata for video object tracking models.
  59. VideoObjectTrackingModelMetadata video_object_tracking_model_metadata = 21;
  60. // Metadata for text extraction models.
  61. TextExtractionModelMetadata text_extraction_model_metadata = 19;
  62. // Metadata for Tables models.
  63. TablesModelMetadata tables_model_metadata = 24;
  64. // Metadata for text sentiment models.
  65. TextSentimentModelMetadata text_sentiment_model_metadata = 22;
  66. }
  67. // Output only. Resource name of the model.
  68. // Format: `projects/{project_id}/locations/{location_id}/models/{model_id}`
  69. string name = 1;
  70. // Required. The name of the model to show in the interface. The name can be
  71. // up to 32 characters long and can consist only of ASCII Latin letters A-Z
  72. // and a-z, underscores
  73. // (_), and ASCII digits 0-9. It must start with a letter.
  74. string display_name = 2;
  75. // Required. The resource ID of the dataset used to create the model. The dataset must
  76. // come from the same ancestor project and location.
  77. string dataset_id = 3;
  78. // Output only. Timestamp when the model training finished and can be used for prediction.
  79. google.protobuf.Timestamp create_time = 7;
  80. // Output only. Timestamp when this model was last updated.
  81. google.protobuf.Timestamp update_time = 11;
  82. // Output only. Deployment state of the model. A model can only serve
  83. // prediction requests after it gets deployed.
  84. DeploymentState deployment_state = 8;
  85. }