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