model.proto 3.9 KB

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