1// Copyright 2023 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 15syntax = "proto3"; 16 17package google.cloud.aiplatform.v1beta1; 18 19import "google/protobuf/struct.proto"; 20import "google/protobuf/timestamp.proto"; 21 22option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; 23option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; 24option java_multiple_files = true; 25option java_outer_classname = "ModelMonitoringAlertProto"; 26option java_package = "com.google.cloud.aiplatform.v1beta1"; 27option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; 28option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; 29 30// Monitoring alert triggered condition. 31message ModelMonitoringAlertCondition { 32 // Alert triggered condition. 33 oneof condition { 34 // A condition that compares a stats value against a threshold. Alert will 35 // be triggered if value above the threshold. 36 double threshold = 1; 37 } 38} 39 40// Represents a single model monitoring anomaly. 41message ModelMonitoringAnomaly { 42 // Tabular anomaly details. 43 message TabularAnomaly { 44 // Additional anomaly information. e.g. Google Cloud Storage uri. 45 string anomaly_uri = 1; 46 47 // Overview of this anomaly. 48 string summary = 2; 49 50 // Anomaly body. 51 google.protobuf.Value anomaly = 3; 52 53 // The time the anomaly was triggered. 54 google.protobuf.Timestamp trigger_time = 4; 55 56 // The alert condition associated with this anomaly. 57 ModelMonitoringAlertCondition condition = 5; 58 } 59 60 oneof anomaly { 61 // Tabular anomaly. 62 TabularAnomaly tabular_anomaly = 1; 63 } 64 65 // Model monitoring job resource name. 66 string model_monitoring_job = 2; 67 68 // Algorithm used to calculated the metrics, eg: jensen_shannon_divergence, 69 // l_infinity. 70 string algorithm = 3; 71} 72 73// Represents a single monitoring alert. This is currently used in the 74// SearchModelMonitoringAlerts api, thus the alert wrapped in this message 75// belongs to the resource asked in the request. 76message ModelMonitoringAlert { 77 // The stats name. 78 string stats_name = 1; 79 80 // One of the supported monitoring objectives: 81 // `raw-feature-drift` 82 // `prediction-output-drift` 83 // `feature-attribution` 84 string objective_type = 2; 85 86 // Alert creation time. 87 google.protobuf.Timestamp alert_time = 3; 88 89 // Anomaly details. 90 ModelMonitoringAnomaly anomaly = 4; 91} 92