Skip to content

Commit 18c88d1

Browse files
rosiezougcf-owl-bot[bot]sasha-gitg
authored
feat: SDK support for model monitoring (#1249)
* feat: SDK support for model monitoring (for models deployed to endpoints; batch prediction use case will be implemented separately)" * fixing syntax errors * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * resolving merge diff * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * removing sync parameter from MDM job * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fixing runtime errors * fixing more runtime errors * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fixing some more linter errors * added endpoint path resolution logic * excluding uninitialized optional arguments for as_proto methods in objective config * fixing typo in class variable * adding more upstream error handling * fixing errors with runtime type checks * fixed runtime errors in update and pause functions * 🦉 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 * removing unused methods * fixed job delete method * removing unused parameter * addressing some PR comments * docs clarification * Update google/cloud/aiplatform/jobs.py Co-authored-by: sasha-gitg <[email protected]> * Update google/cloud/aiplatform/jobs.py Co-authored-by: sasha-gitg <[email protected]> * Update google/cloud/aiplatform/jobs.py Co-authored-by: sasha-gitg <[email protected]> * fixing logic for checking explanation_specs * chore: system test for model monitoring (#1428) * chore: adding system test for model monitoring * debugged system test * removing extra print statements * added test coverage for pause resume and delete methods * added test coverage for model monitoring config for two models * fixing test bug * added test coverage for XAI error case * addressed more PR comments * addressing remaining comments * adding more error checking in parse_configs helper function * minor fix for deployed model ID validation logic * addressing docs commentes * addressed more PR comments * removing runtime errors * added more documentation * 🦉 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 * addressing PR comments * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * addressing more PR comments * adding more doc strings * more fixes * formatting * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * added more test coverage and changed iterator names for parse_configs function * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * making objective config class non-abstract * renaming configuration classes * 🦉 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> Co-authored-by: sasha-gitg <[email protected]>
1 parent b4945eb commit 18c88d1

File tree

11 files changed

+1589
-9
lines changed

11 files changed

+1589
-9
lines changed

google/cloud/aiplatform/__init__.py

+10
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
BatchPredictionJob,
5252
CustomJob,
5353
HyperparameterTuningJob,
54+
ModelDeploymentMonitoringJob,
5455
)
5556
from google.cloud.aiplatform.pipeline_jobs import PipelineJob
5657
from google.cloud.aiplatform.tensorboard import (
@@ -70,6 +71,7 @@
7071
AutoMLTextTrainingJob,
7172
AutoMLVideoTrainingJob,
7273
)
74+
7375
from google.cloud.aiplatform import helpers
7476

7577
"""
@@ -124,7 +126,12 @@
124126
"CustomTrainingJob",
125127
"CustomContainerTrainingJob",
126128
"CustomPythonPackageTrainingJob",
129+
"EmailAlertConfig",
127130
"Endpoint",
131+
"DriftDetectionConfig",
132+
"ExplanationConfig",
133+
"ObjectiveConfig",
134+
"SkewDetectionConfig",
128135
"EntityType",
129136
"Execution",
130137
"Experiment",
@@ -137,9 +144,12 @@
137144
"HyperparameterTuningJob",
138145
"Model",
139146
"ModelEvaluation",
147+
"ModelDeploymentMonitoringJob",
140148
"PipelineJob",
141149
"PrivateEndpoint",
150+
"RandomSampleConfig",
142151
"SequenceToSequencePlusForecastingTrainingJob",
152+
"ScheduleConfig",
143153
"TabularDataset",
144154
"Tensorboard",
145155
"TensorboardExperiment",

google/cloud/aiplatform/compat/__init__.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22

3-
# Copyright 2021 Google LLC
3+
# Copyright 2022 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -94,6 +94,10 @@
9494
types.model = types.model_v1beta1
9595
types.model_evaluation = types.model_evaluation_v1beta1
9696
types.model_evaluation_slice = types.model_evaluation_slice_v1beta1
97+
types.model_deployment_monitoring_job = (
98+
types.model_deployment_monitoring_job_v1beta1
99+
)
100+
types.model_monitoring = types.model_monitoring_v1beta1
97101
types.model_service = types.model_service_v1beta1
98102
types.operation = types.operation_v1beta1
99103
types.pipeline_failure_policy = types.pipeline_failure_policy_v1beta1
@@ -179,6 +183,8 @@
179183
types.model = types.model_v1
180184
types.model_evaluation = types.model_evaluation_v1
181185
types.model_evaluation_slice = types.model_evaluation_slice_v1
186+
types.model_deployment_monitoring_job = types.model_deployment_monitoring_job_v1
187+
types.model_monitoring = types.model_monitoring_v1
182188
types.model_service = types.model_service_v1
183189
types.operation = types.operation_v1
184190
types.pipeline_failure_policy = types.pipeline_failure_policy_v1

google/cloud/aiplatform/compat/types/__init__.py

+8
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@
6161
model as model_v1beta1,
6262
model_evaluation as model_evaluation_v1beta1,
6363
model_evaluation_slice as model_evaluation_slice_v1beta1,
64+
model_deployment_monitoring_job as model_deployment_monitoring_job_v1beta1,
6465
model_service as model_service_v1beta1,
66+
model_monitoring as model_monitoring_v1beta1,
6567
operation as operation_v1beta1,
6668
pipeline_failure_policy as pipeline_failure_policy_v1beta1,
6769
pipeline_job as pipeline_job_v1beta1,
@@ -125,7 +127,9 @@
125127
model as model_v1,
126128
model_evaluation as model_evaluation_v1,
127129
model_evaluation_slice as model_evaluation_slice_v1,
130+
model_deployment_monitoring_job as model_deployment_monitoring_job_v1,
128131
model_service as model_service_v1,
132+
model_monitoring as model_monitoring_v1,
129133
operation as operation_v1,
130134
pipeline_failure_policy as pipeline_failure_policy_v1,
131135
pipeline_job as pipeline_job_v1,
@@ -191,7 +195,9 @@
191195
model_v1,
192196
model_evaluation_v1,
193197
model_evaluation_slice_v1,
198+
model_deployment_monitoring_job_v1,
194199
model_service_v1,
200+
model_monitoring_v1,
195201
operation_v1,
196202
pipeline_failure_policy_v1beta1,
197203
pipeline_job_v1,
@@ -254,7 +260,9 @@
254260
model_v1beta1,
255261
model_evaluation_v1beta1,
256262
model_evaluation_slice_v1beta1,
263+
model_deployment_monitoring_job_v1beta1,
257264
model_service_v1beta1,
265+
model_monitoring_v1beta1,
258266
operation_v1beta1,
259267
pipeline_failure_policy_v1beta1,
260268
pipeline_job_v1beta1,

0 commit comments

Comments
 (0)