model_evaluation.proto 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. // Copyright 2021 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.v1;
  16. import "google/api/resource.proto";
  17. import "google/cloud/automl/v1/classification.proto";
  18. import "google/cloud/automl/v1/detection.proto";
  19. import "google/cloud/automl/v1/text_extraction.proto";
  20. import "google/cloud/automl/v1/text_sentiment.proto";
  21. import "google/cloud/automl/v1/translation.proto";
  22. import "google/protobuf/timestamp.proto";
  23. option csharp_namespace = "Google.Cloud.AutoML.V1";
  24. option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1;automl";
  25. option java_multiple_files = true;
  26. option java_package = "com.google.cloud.automl.v1";
  27. option php_namespace = "Google\\Cloud\\AutoMl\\V1";
  28. option ruby_package = "Google::Cloud::AutoML::V1";
  29. // Evaluation results of a model.
  30. message ModelEvaluation {
  31. option (google.api.resource) = {
  32. type: "automl.googleapis.com/ModelEvaluation"
  33. pattern: "projects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}"
  34. };
  35. // Output only. Problem type specific evaluation metrics.
  36. oneof metrics {
  37. // Model evaluation metrics for image, text, video and tables
  38. // classification.
  39. // Tables problem is considered a classification when the target column
  40. // is CATEGORY DataType.
  41. ClassificationEvaluationMetrics classification_evaluation_metrics = 8;
  42. // Model evaluation metrics for translation.
  43. TranslationEvaluationMetrics translation_evaluation_metrics = 9;
  44. // Model evaluation metrics for image object detection.
  45. ImageObjectDetectionEvaluationMetrics image_object_detection_evaluation_metrics = 12;
  46. // Evaluation metrics for text sentiment models.
  47. TextSentimentEvaluationMetrics text_sentiment_evaluation_metrics = 11;
  48. // Evaluation metrics for text extraction models.
  49. TextExtractionEvaluationMetrics text_extraction_evaluation_metrics = 13;
  50. }
  51. // Output only. Resource name of the model evaluation.
  52. // Format:
  53. // `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}`
  54. string name = 1;
  55. // Output only. The ID of the annotation spec that the model evaluation applies to. The
  56. // The ID is empty for the overall model evaluation.
  57. // For Tables annotation specs in the dataset do not exist and this ID is
  58. // always not set, but for CLASSIFICATION
  59. // [prediction_type-s][google.cloud.automl.v1.TablesModelMetadata.prediction_type]
  60. // the
  61. // [display_name][google.cloud.automl.v1.ModelEvaluation.display_name]
  62. // field is used.
  63. string annotation_spec_id = 2;
  64. // Output only. The value of
  65. // [display_name][google.cloud.automl.v1.AnnotationSpec.display_name]
  66. // at the moment when the model was trained. Because this field returns a
  67. // value at model training time, for different models trained from the same
  68. // dataset, the values may differ, since display names could had been changed
  69. // between the two model's trainings. For Tables CLASSIFICATION
  70. // [prediction_type-s][google.cloud.automl.v1.TablesModelMetadata.prediction_type]
  71. // distinct values of the target column at the moment of the model evaluation
  72. // are populated here.
  73. // The display_name is empty for the overall model evaluation.
  74. string display_name = 15;
  75. // Output only. Timestamp when this model evaluation was created.
  76. google.protobuf.Timestamp create_time = 5;
  77. // Output only. The number of examples used for model evaluation, i.e. for
  78. // which ground truth from time of model creation is compared against the
  79. // predicted annotations created by the model.
  80. // For overall ModelEvaluation (i.e. with annotation_spec_id not set) this is
  81. // the total number of all examples used for evaluation.
  82. // Otherwise, this is the count of examples that according to the ground
  83. // truth were annotated by the
  84. // [annotation_spec_id][google.cloud.automl.v1.ModelEvaluation.annotation_spec_id].
  85. int32 evaluated_example_count = 6;
  86. }