Skip to content

Commit

Permalink
feat: SDK support for model monitoring (#1249)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
3 people authored Jul 28, 2022
1 parent b4945eb commit 18c88d1
Show file tree
Hide file tree
Showing 11 changed files with 1,589 additions and 9 deletions.
10 changes: 10 additions & 0 deletions google/cloud/aiplatform/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
BatchPredictionJob,
CustomJob,
HyperparameterTuningJob,
ModelDeploymentMonitoringJob,
)
from google.cloud.aiplatform.pipeline_jobs import PipelineJob
from google.cloud.aiplatform.tensorboard import (
Expand All @@ -70,6 +71,7 @@
AutoMLTextTrainingJob,
AutoMLVideoTrainingJob,
)

from google.cloud.aiplatform import helpers

"""
Expand Down Expand Up @@ -124,7 +126,12 @@
"CustomTrainingJob",
"CustomContainerTrainingJob",
"CustomPythonPackageTrainingJob",
"EmailAlertConfig",
"Endpoint",
"DriftDetectionConfig",
"ExplanationConfig",
"ObjectiveConfig",
"SkewDetectionConfig",
"EntityType",
"Execution",
"Experiment",
Expand All @@ -137,9 +144,12 @@
"HyperparameterTuningJob",
"Model",
"ModelEvaluation",
"ModelDeploymentMonitoringJob",
"PipelineJob",
"PrivateEndpoint",
"RandomSampleConfig",
"SequenceToSequencePlusForecastingTrainingJob",
"ScheduleConfig",
"TabularDataset",
"Tensorboard",
"TensorboardExperiment",
Expand Down
8 changes: 7 additions & 1 deletion google/cloud/aiplatform/compat/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

# Copyright 2021 Google LLC
# 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.
Expand Down Expand Up @@ -94,6 +94,10 @@
types.model = types.model_v1beta1
types.model_evaluation = types.model_evaluation_v1beta1
types.model_evaluation_slice = types.model_evaluation_slice_v1beta1
types.model_deployment_monitoring_job = (
types.model_deployment_monitoring_job_v1beta1
)
types.model_monitoring = types.model_monitoring_v1beta1
types.model_service = types.model_service_v1beta1
types.operation = types.operation_v1beta1
types.pipeline_failure_policy = types.pipeline_failure_policy_v1beta1
Expand Down Expand Up @@ -179,6 +183,8 @@
types.model = types.model_v1
types.model_evaluation = types.model_evaluation_v1
types.model_evaluation_slice = types.model_evaluation_slice_v1
types.model_deployment_monitoring_job = types.model_deployment_monitoring_job_v1
types.model_monitoring = types.model_monitoring_v1
types.model_service = types.model_service_v1
types.operation = types.operation_v1
types.pipeline_failure_policy = types.pipeline_failure_policy_v1
Expand Down
8 changes: 8 additions & 0 deletions google/cloud/aiplatform/compat/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@
model as model_v1beta1,
model_evaluation as model_evaluation_v1beta1,
model_evaluation_slice as model_evaluation_slice_v1beta1,
model_deployment_monitoring_job as model_deployment_monitoring_job_v1beta1,
model_service as model_service_v1beta1,
model_monitoring as model_monitoring_v1beta1,
operation as operation_v1beta1,
pipeline_failure_policy as pipeline_failure_policy_v1beta1,
pipeline_job as pipeline_job_v1beta1,
Expand Down Expand Up @@ -125,7 +127,9 @@
model as model_v1,
model_evaluation as model_evaluation_v1,
model_evaluation_slice as model_evaluation_slice_v1,
model_deployment_monitoring_job as model_deployment_monitoring_job_v1,
model_service as model_service_v1,
model_monitoring as model_monitoring_v1,
operation as operation_v1,
pipeline_failure_policy as pipeline_failure_policy_v1,
pipeline_job as pipeline_job_v1,
Expand Down Expand Up @@ -191,7 +195,9 @@
model_v1,
model_evaluation_v1,
model_evaluation_slice_v1,
model_deployment_monitoring_job_v1,
model_service_v1,
model_monitoring_v1,
operation_v1,
pipeline_failure_policy_v1beta1,
pipeline_job_v1,
Expand Down Expand Up @@ -254,7 +260,9 @@
model_v1beta1,
model_evaluation_v1beta1,
model_evaluation_slice_v1beta1,
model_deployment_monitoring_job_v1beta1,
model_service_v1beta1,
model_monitoring_v1beta1,
operation_v1beta1,
pipeline_failure_policy_v1beta1,
pipeline_job_v1beta1,
Expand Down
Loading

0 comments on commit 18c88d1

Please sign in to comment.