Skip to content

Commit

Permalink
feat: add monitoring_config to EntityType in aiplatform v1 entity_typ…
Browse files Browse the repository at this point in the history
…e.proto (#277)

* feat: add monitoring_config to EntityType in aiplatform v1 entity_type.proto
feat: add disable_monitoring to Feature in aiplatform v1 feature.proto
feat: add monitoring_stats_anomalies to Feature in aiplatform v1 feature.proto
feat: add staleness_days to SnapshotAnalysis in aiplatform v1 featurestore_monitoring.proto
feat: add import_features_analysis to FeaturestoreMonitoringConfig in aiplatform v1 featurestore_monitoring.proto
feat: add numerical_threshold_config to FeaturestoreMonitoringConfig in aiplatform v1 featurestore_monitoring.proto
feat: add categorical_threshold_config to FeaturestoreMonitoringConfig in aiplatform v1 featurestore_monitoring.proto
feat: add objective to MonitoringStatsSpec in aiplatform v1 featurestore_service.proto

feat: add disable_monitoring to Feature in aiplatform v1beta1 feature.proto
feat: add monitoring_stats_anomalies to Feature in aiplatform v1beta1 feature.proto
feat: add staleness_days to SnapshotAnalysis in aiplatform v1beta1 featurestore_monitoring.proto
feat: add import_features_analysis to FeaturestoreMonitoringConfig in aiplatform v1beta1 featurestore_monitoring.proto
feat: add numerical_threshold_config to FeaturestoreMonitoringConfig in aiplatform v1beta1 featurestore_monitoring.proto
feat: add categorical_threshold_config to FeaturestoreMonitoringConfig in aiplatform v1beta1 featurestore_monitoring.proto
feat: add objective to MonitoringStatsSpec in aiplatform v1beta1 featurestore_service.proto
PiperOrigin-RevId: 434018027

Source-Link: googleapis/googleapis@90f38d1

Source-Link: googleapis/googleapis-gen@f6adb41
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjZhZGI0MTAzMzBiZDUyZDdiNTM5ZDQzMjJlNjZjYzQ2MDNiYTM0YSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Mar 14, 2022
1 parent 9e21b02 commit e9631b1
Show file tree
Hide file tree
Showing 35 changed files with 3,896 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package google.cloud.aiplatform.v1;

import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/aiplatform/v1/featurestore_monitoring.proto";
import "google/protobuf/timestamp.proto";

option csharp_namespace = "Google.Cloud.AIPlatform.V1";
Expand Down Expand Up @@ -72,4 +73,16 @@ message EntityType {
// Optional. Used to perform a consistent read-modify-write updates. If not set, a blind
// "overwrite" update happens.
string etag = 7 [(google.api.field_behavior) = OPTIONAL];

// Optional. The default monitoring configuration for all Features with value
// type
// ([Feature.ValueType][google.cloud.aiplatform.v1.Feature.ValueType]) BOOL,
// STRING, DOUBLE or INT64 under this EntityType.
//
// If this is populated with
// [FeaturestoreMonitoringConfig.monitoring_interval] specified, snapshot
// analysis monitoring is enabled. Otherwise, snapshot analysis monitoring is
// disabled.
FeaturestoreMonitoringConfig monitoring_config = 8
[(google.api.field_behavior) = OPTIONAL];
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package google.cloud.aiplatform.v1;

import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/aiplatform/v1/feature_monitoring_stats.proto";
import "google/protobuf/timestamp.proto";

option csharp_namespace = "Google.Cloud.AIPlatform.V1";
Expand All @@ -37,6 +38,36 @@ message Feature {
pattern: "projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}"
};

// A list of historical [Snapshot
// Analysis][FeaturestoreMonitoringConfig.SnapshotAnalysis] or [Import Feature
// Analysis] [FeaturestoreMonitoringConfig.ImportFeatureAnalysis] stats
// requested by user, sorted by
// [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1.FeatureStatsAnomaly.start_time]
// descending.
message MonitoringStatsAnomaly {
// If the objective in the request is both
// Import Feature Analysis and Snapshot Analysis, this objective could be
// one of them. Otherwise, this objective should be the same as the
// objective in the request.
enum Objective {
// If it's OBJECTIVE_UNSPECIFIED, monitoring_stats will be empty.
OBJECTIVE_UNSPECIFIED = 0;

// Stats are generated by Import Feature Analysis.
IMPORT_FEATURE_ANALYSIS = 1;

// Stats are generated by Snapshot Analysis.
SNAPSHOT_ANALYSIS = 2;
}

// Output only. The objective for each stats.
Objective objective = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The stats and anomalies generated at specific timestamp.
FeatureStatsAnomaly feature_stats_anomaly = 2
[(google.api.field_behavior) = OUTPUT_ONLY];
}

// An enum representing the value type of a feature.
enum ValueType {
// The value type is unspecified.
Expand Down Expand Up @@ -111,4 +142,18 @@ message Feature {
// Used to perform a consistent read-modify-write updates. If not set, a blind
// "overwrite" update happens.
string etag = 7;

// Optional. If not set, use the monitoring_config defined for the EntityType
// this Feature belongs to. Only Features with type
// ([Feature.ValueType][google.cloud.aiplatform.v1.Feature.ValueType]) BOOL,
// STRING, DOUBLE or INT64 can enable monitoring.
//
// If set to true, all types of data monitoring are disabled despite the
// config on EntityType.
bool disable_monitoring = 12 [(google.api.field_behavior) = OPTIONAL];

// Output only. The list of historical stats and anomalies with specified
// objectives.
repeated MonitoringStatsAnomaly monitoring_stats_anomalies = 11
[(google.api.field_behavior) = OUTPUT_ONLY];
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.cloud.aiplatform.v1;

option csharp_namespace = "Google.Cloud.AIPlatform.V1";
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform";
option java_multiple_files = true;
option java_outer_classname = "FeaturestoreMonitoringProto";
option java_package = "com.google.cloud.aiplatform.v1";
option php_namespace = "Google\\Cloud\\AIPlatform\\V1";
option ruby_package = "Google::Cloud::AIPlatform::V1";

// Configuration of how features in Featurestore are monitored.
message FeaturestoreMonitoringConfig {
// Configuration of the Featurestore's Snapshot Analysis Based Monitoring.
// This type of analysis generates statistics for each Feature based on a
// snapshot of the latest feature value of each entities every
// monitoring_interval.
message SnapshotAnalysis {
// The monitoring schedule for snapshot analysis.
// For EntityType-level config:
// unset / disabled = true indicates disabled by
// default for Features under it; otherwise by default enable snapshot
// analysis monitoring with monitoring_interval for Features under it.
// Feature-level config:
// disabled = true indicates disabled regardless of the EntityType-level
// config; unset monitoring_interval indicates going with EntityType-level
// config; otherwise run snapshot analysis monitoring with
// monitoring_interval regardless of the EntityType-level config.
// Explicitly Disable the snapshot analysis based monitoring.
bool disabled = 1;

// Configuration of the snapshot analysis based monitoring pipeline
// running interval. The value indicates number of days.
// If both
// [FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days][google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days]
// and [FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval][]
// are set when creating/updating EntityTypes/Features,
// [FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days][google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days]
// will be used.
int32 monitoring_interval_days = 3;

// Customized export features time window for snapshot analysis. Unit is one
// day. Default value is 3 weeks. Minimum value is 1 day. Maximum value is
// 4000 days.
int32 staleness_days = 4;
}

// Configuration of the Featurestore's ImportFeature Analysis Based
// Monitoring. This type of analysis generates statistics for values of each
// Feature imported by every [ImportFeatureValues][] operation.
message ImportFeaturesAnalysis {
// The state defines whether to enable ImportFeature analysis.
enum State {
// Should not be used.
STATE_UNSPECIFIED = 0;

// The default behavior of whether to enable the monitoring.
// EntityType-level config: disabled.
// Feature-level config: inherited from the configuration of EntityType
// this Feature belongs to.
DEFAULT = 1;

// Explicitly enables import features analysis.
// EntityType-level config: by default enables import features analysis
// for all Features under it. Feature-level config: enables import
// features analysis regardless of the EntityType-level config.
ENABLED = 2;

// Explicitly disables import features analysis.
// EntityType-level config: by default disables import features analysis
// for all Features under it. Feature-level config: disables import
// features analysis regardless of the EntityType-level config.
DISABLED = 3;
}

// Defines the baseline to do anomaly detection for feature values imported
// by each [ImportFeatureValues][] operation.
enum Baseline {
// Should not be used.
BASELINE_UNSPECIFIED = 0;

// Choose the later one statistics generated by either most recent
// snapshot analysis or previous import features analysis. If non of them
// exists, skip anomaly detection and only generate a statistics.
LATEST_STATS = 1;

// Use the statistics generated by the most recent snapshot analysis if
// exists.
MOST_RECENT_SNAPSHOT_STATS = 2;

// Use the statistics generated by the previous import features analysis
// if exists.
PREVIOUS_IMPORT_FEATURES_STATS = 3;
}

// Whether to enable / disable / inherite default hebavior for import
// features analysis.
State state = 1;

// The baseline used to do anomaly detection for the statistics generated by
// import features analysis.
Baseline anomaly_detection_baseline = 2;
}

// The config for Featurestore Monitoring threshold.
message ThresholdConfig {
oneof threshold {
// Specify a threshold value that can trigger the alert.
// 1. For categorical feature, the distribution distance is calculated by
// L-inifinity norm.
// 2. For numerical feature, the distribution distance is calculated by
// Jensen–Shannon divergence. Each feature must have a non-zero threshold
// if they need to be monitored. Otherwise no alert will be triggered for
// that feature.
double value = 1;
}
}

// The config for Snapshot Analysis Based Feature Monitoring.
SnapshotAnalysis snapshot_analysis = 1;

// The config for ImportFeatures Analysis Based Feature Monitoring.
ImportFeaturesAnalysis import_features_analysis = 2;

// Threshold for numerical features of anomaly detection.
// This is shared by all objectives of Featurestore Monitoring for numerical
// features (i.e. Features with type
// ([Feature.ValueType][google.cloud.aiplatform.v1.Feature.ValueType]) DOUBLE
// or INT64).
ThresholdConfig numerical_threshold_config = 3;

// Threshold for categorical features of anomaly detection.
// This is shared by all types of Featurestore Monitoring for categorical
// features (i.e. Features with type
// ([Feature.ValueType][google.cloud.aiplatform.v1.Feature.ValueType]) BOOL or
// STRING).
ThresholdConfig categorical_threshold_config = 4;
}
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,9 @@ message ImportFeatureValuesRequest {
// If not set, defaults to using 1 worker. The low count ensures minimal
// impact on online serving performance.
int32 worker_count = 11;

// If true, API doesn't start ingestion analysis pipeline.
bool disable_ingestion_analysis = 12;
}

// Response message for [FeaturestoreService.ImportFeatureValues][google.cloud.aiplatform.v1.FeaturestoreService.ImportFeatureValues].
Expand Down Expand Up @@ -846,7 +849,12 @@ message UpdateEntityTypeRequest {
// * `description`
// * `labels`
// * `monitoring_config.snapshot_analysis.disabled`
// * `monitoring_config.snapshot_analysis.monitoring_interval`
// * `monitoring_config.snapshot_analysis.monitoring_interval_days`
// * `monitoring_config.snapshot_analysis.staleness_days`
// * `monitoring_config.import_features_analysis.state`
// * `monitoring_config.import_features_analysis.anomaly_detection_baseline`
// * `monitoring_config.numerical_threshold_config.value`
// * `monitoring_config.categorical_threshold_config.value`
google.protobuf.FieldMask update_mask = 2;
}

Expand Down Expand Up @@ -1138,8 +1146,7 @@ message UpdateFeatureRequest {
//
// * `description`
// * `labels`
// * `monitoring_config.snapshot_analysis.disabled`
// * `monitoring_config.snapshot_analysis.monitoring_interval`
// * `disable_monitoring`
google.protobuf.FieldMask update_mask = 2;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,36 @@ message Feature {
pattern: "projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}"
};

// A list of historical [Snapshot
// Analysis][FeaturestoreMonitoringConfig.SnapshotAnalysis] or [Import Feature
// Analysis] [FeaturestoreMonitoringConfig.ImportFeatureAnalysis] stats
// requested by user, sorted by
// [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly.start_time]
// descending.
message MonitoringStatsAnomaly {
// If the objective in the request is both
// Import Feature Analysis and Snapshot Analysis, this objective could be
// one of them. Otherwise, this objective should be the same as the
// objective in the request.
enum Objective {
// If it's OBJECTIVE_UNSPECIFIED, monitoring_stats will be empty.
OBJECTIVE_UNSPECIFIED = 0;

// Stats are generated by Import Feature Analysis.
IMPORT_FEATURE_ANALYSIS = 1;

// Stats are generated by Snapshot Analysis.
SNAPSHOT_ANALYSIS = 2;
}

// Output only. The objective for each stats.
Objective objective = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The stats and anomalies generated at specific timestamp.
FeatureStatsAnomaly feature_stats_anomaly = 2
[(google.api.field_behavior) = OUTPUT_ONLY];
}

// An enum representing the value type of a feature.
enum ValueType {
// The value type is unspecified.
Expand Down Expand Up @@ -128,9 +158,23 @@ message Feature {
// config is same as the EntityType's this Feature belongs to.
FeaturestoreMonitoringConfig monitoring_config = 9 [(google.api.field_behavior) = OPTIONAL];

// Optional. If not set, use the monitoring_config defined for the EntityType
// this Feature belongs to. Only Features with type
// ([Feature.ValueType][google.cloud.aiplatform.v1beta1.Feature.ValueType])
// BOOL, STRING, DOUBLE or INT64 can enable monitoring.
//
// If set to true, all types of data monitoring are disabled despite the
// config on EntityType.
bool disable_monitoring = 12 [(google.api.field_behavior) = OPTIONAL];

// Output only. A list of historical [Snapshot
// Analysis][FeaturestoreMonitoringConfig.SnapshotAnalysis]
// stats requested by user, sorted by [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly.start_time]
// descending.
repeated FeatureStatsAnomaly monitoring_stats = 10 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The list of historical stats and anomalies with specified
// objectives.
repeated MonitoringStatsAnomaly monitoring_stats_anomalies = 11
[(google.api.field_behavior) = OUTPUT_ONLY];
}
Loading

0 comments on commit e9631b1

Please sign in to comment.