|
| 1 | +// Copyright 2022 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 | + |
| 15 | +syntax = "proto3"; |
| 16 | + |
| 17 | +package google.cloud.aiplatform.v1; |
| 18 | + |
| 19 | +option csharp_namespace = "Google.Cloud.AIPlatform.V1"; |
| 20 | +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform"; |
| 21 | +option java_multiple_files = true; |
| 22 | +option java_outer_classname = "FeaturestoreMonitoringProto"; |
| 23 | +option java_package = "com.google.cloud.aiplatform.v1"; |
| 24 | +option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; |
| 25 | +option ruby_package = "Google::Cloud::AIPlatform::V1"; |
| 26 | + |
| 27 | +// Configuration of how features in Featurestore are monitored. |
| 28 | +message FeaturestoreMonitoringConfig { |
| 29 | + // Configuration of the Featurestore's Snapshot Analysis Based Monitoring. |
| 30 | + // This type of analysis generates statistics for each Feature based on a |
| 31 | + // snapshot of the latest feature value of each entities every |
| 32 | + // monitoring_interval. |
| 33 | + message SnapshotAnalysis { |
| 34 | + // The monitoring schedule for snapshot analysis. |
| 35 | + // For EntityType-level config: |
| 36 | + // unset / disabled = true indicates disabled by |
| 37 | + // default for Features under it; otherwise by default enable snapshot |
| 38 | + // analysis monitoring with monitoring_interval for Features under it. |
| 39 | + // Feature-level config: |
| 40 | + // disabled = true indicates disabled regardless of the EntityType-level |
| 41 | + // config; unset monitoring_interval indicates going with EntityType-level |
| 42 | + // config; otherwise run snapshot analysis monitoring with |
| 43 | + // monitoring_interval regardless of the EntityType-level config. |
| 44 | + // Explicitly Disable the snapshot analysis based monitoring. |
| 45 | + bool disabled = 1; |
| 46 | + |
| 47 | + // Configuration of the snapshot analysis based monitoring pipeline |
| 48 | + // running interval. The value indicates number of days. |
| 49 | + // If both |
| 50 | + // [FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days][google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days] |
| 51 | + // and [FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval][] |
| 52 | + // are set when creating/updating EntityTypes/Features, |
| 53 | + // [FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days][google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days] |
| 54 | + // will be used. |
| 55 | + int32 monitoring_interval_days = 3; |
| 56 | + |
| 57 | + // Customized export features time window for snapshot analysis. Unit is one |
| 58 | + // day. Default value is 3 weeks. Minimum value is 1 day. Maximum value is |
| 59 | + // 4000 days. |
| 60 | + int32 staleness_days = 4; |
| 61 | + } |
| 62 | + |
| 63 | + // Configuration of the Featurestore's ImportFeature Analysis Based |
| 64 | + // Monitoring. This type of analysis generates statistics for values of each |
| 65 | + // Feature imported by every [ImportFeatureValues][] operation. |
| 66 | + message ImportFeaturesAnalysis { |
| 67 | + // The state defines whether to enable ImportFeature analysis. |
| 68 | + enum State { |
| 69 | + // Should not be used. |
| 70 | + STATE_UNSPECIFIED = 0; |
| 71 | + |
| 72 | + // The default behavior of whether to enable the monitoring. |
| 73 | + // EntityType-level config: disabled. |
| 74 | + // Feature-level config: inherited from the configuration of EntityType |
| 75 | + // this Feature belongs to. |
| 76 | + DEFAULT = 1; |
| 77 | + |
| 78 | + // Explicitly enables import features analysis. |
| 79 | + // EntityType-level config: by default enables import features analysis |
| 80 | + // for all Features under it. Feature-level config: enables import |
| 81 | + // features analysis regardless of the EntityType-level config. |
| 82 | + ENABLED = 2; |
| 83 | + |
| 84 | + // Explicitly disables import features analysis. |
| 85 | + // EntityType-level config: by default disables import features analysis |
| 86 | + // for all Features under it. Feature-level config: disables import |
| 87 | + // features analysis regardless of the EntityType-level config. |
| 88 | + DISABLED = 3; |
| 89 | + } |
| 90 | + |
| 91 | + // Defines the baseline to do anomaly detection for feature values imported |
| 92 | + // by each [ImportFeatureValues][] operation. |
| 93 | + enum Baseline { |
| 94 | + // Should not be used. |
| 95 | + BASELINE_UNSPECIFIED = 0; |
| 96 | + |
| 97 | + // Choose the later one statistics generated by either most recent |
| 98 | + // snapshot analysis or previous import features analysis. If non of them |
| 99 | + // exists, skip anomaly detection and only generate a statistics. |
| 100 | + LATEST_STATS = 1; |
| 101 | + |
| 102 | + // Use the statistics generated by the most recent snapshot analysis if |
| 103 | + // exists. |
| 104 | + MOST_RECENT_SNAPSHOT_STATS = 2; |
| 105 | + |
| 106 | + // Use the statistics generated by the previous import features analysis |
| 107 | + // if exists. |
| 108 | + PREVIOUS_IMPORT_FEATURES_STATS = 3; |
| 109 | + } |
| 110 | + |
| 111 | + // Whether to enable / disable / inherite default hebavior for import |
| 112 | + // features analysis. |
| 113 | + State state = 1; |
| 114 | + |
| 115 | + // The baseline used to do anomaly detection for the statistics generated by |
| 116 | + // import features analysis. |
| 117 | + Baseline anomaly_detection_baseline = 2; |
| 118 | + } |
| 119 | + |
| 120 | + // The config for Featurestore Monitoring threshold. |
| 121 | + message ThresholdConfig { |
| 122 | + oneof threshold { |
| 123 | + // Specify a threshold value that can trigger the alert. |
| 124 | + // 1. For categorical feature, the distribution distance is calculated by |
| 125 | + // L-inifinity norm. |
| 126 | + // 2. For numerical feature, the distribution distance is calculated by |
| 127 | + // Jensen–Shannon divergence. Each feature must have a non-zero threshold |
| 128 | + // if they need to be monitored. Otherwise no alert will be triggered for |
| 129 | + // that feature. |
| 130 | + double value = 1; |
| 131 | + } |
| 132 | + } |
| 133 | + |
| 134 | + // The config for Snapshot Analysis Based Feature Monitoring. |
| 135 | + SnapshotAnalysis snapshot_analysis = 1; |
| 136 | + |
| 137 | + // The config for ImportFeatures Analysis Based Feature Monitoring. |
| 138 | + ImportFeaturesAnalysis import_features_analysis = 2; |
| 139 | + |
| 140 | + // Threshold for numerical features of anomaly detection. |
| 141 | + // This is shared by all objectives of Featurestore Monitoring for numerical |
| 142 | + // features (i.e. Features with type |
| 143 | + // ([Feature.ValueType][google.cloud.aiplatform.v1.Feature.ValueType]) DOUBLE |
| 144 | + // or INT64). |
| 145 | + ThresholdConfig numerical_threshold_config = 3; |
| 146 | + |
| 147 | + // Threshold for categorical features of anomaly detection. |
| 148 | + // This is shared by all types of Featurestore Monitoring for categorical |
| 149 | + // features (i.e. Features with type |
| 150 | + // ([Feature.ValueType][google.cloud.aiplatform.v1.Feature.ValueType]) BOOL or |
| 151 | + // STRING). |
| 152 | + ThresholdConfig categorical_threshold_config = 4; |
| 153 | +} |
0 commit comments