Skip to content

Commit d35df58

Browse files
feat: add model_monitoring_config to BatchPredictionJob in aiplatform v1beta1 batch_prediction_job.proto (#1450)
* feat: add model_monitoring_config to BatchPredictionJob in aiplatform v1beta1 batch_prediction_job.proto PiperOrigin-RevId: 456339444 Source-Link: googleapis/googleapis@3b9c451 Source-Link: googleapis/googleapis-gen@95a293b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTVhMjkzYmVhYjVkYjYyZDNjNzM0YjA4MzU1MGUwYWI0NDZhOWFkMyJ9 * 🦉 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>
1 parent 1c198f1 commit d35df58

File tree

4 files changed

+53
-0
lines changed

4 files changed

+53
-0
lines changed

google/cloud/aiplatform_v1beta1/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@
344344
from .types.model_evaluation import ModelEvaluation
345345
from .types.model_evaluation_slice import ModelEvaluationSlice
346346
from .types.model_monitoring import ModelMonitoringAlertConfig
347+
from .types.model_monitoring import ModelMonitoringConfig
347348
from .types.model_monitoring import ModelMonitoringObjectiveConfig
348349
from .types.model_monitoring import SamplingStrategy
349350
from .types.model_monitoring import ThresholdConfig
@@ -841,6 +842,7 @@
841842
"ModelEvaluationSlice",
842843
"ModelExplanation",
843844
"ModelMonitoringAlertConfig",
845+
"ModelMonitoringConfig",
844846
"ModelMonitoringObjectiveConfig",
845847
"ModelMonitoringStatsAnomalies",
846848
"ModelServiceClient",

google/cloud/aiplatform_v1beta1/types/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@
395395
)
396396
from .model_monitoring import (
397397
ModelMonitoringAlertConfig,
398+
ModelMonitoringConfig,
398399
ModelMonitoringObjectiveConfig,
399400
SamplingStrategy,
400401
ThresholdConfig,
@@ -878,6 +879,7 @@
878879
"ModelEvaluation",
879880
"ModelEvaluationSlice",
880881
"ModelMonitoringAlertConfig",
882+
"ModelMonitoringConfig",
881883
"ModelMonitoringObjectiveConfig",
882884
"SamplingStrategy",
883885
"ThresholdConfig",

google/cloud/aiplatform_v1beta1/types/batch_prediction_job.py

+11
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
from google.cloud.aiplatform_v1beta1.types import (
2727
manual_batch_tuning_parameters as gca_manual_batch_tuning_parameters,
2828
)
29+
from google.cloud.aiplatform_v1beta1.types import model_monitoring
2930
from google.cloud.aiplatform_v1beta1.types import (
3031
unmanaged_container_model as gca_unmanaged_container_model,
3132
)
@@ -214,6 +215,11 @@ class BatchPredictionJob(proto.Message):
214215
BatchPredictionJob. If this is set, then all
215216
resources created by the BatchPredictionJob will
216217
be encrypted with the provided encryption key.
218+
model_monitoring_config (google.cloud.aiplatform_v1beta1.types.ModelMonitoringConfig):
219+
Model monitoring config will be used for
220+
analysis model behaviors, based on the input and
221+
output to the batch prediction job, as well as
222+
the provided training dataset.
217223
"""
218224

219225
class InputConfig(proto.Message):
@@ -528,6 +534,11 @@ class OutputInfo(proto.Message):
528534
number=24,
529535
message=gca_encryption_spec.EncryptionSpec,
530536
)
537+
model_monitoring_config = proto.Field(
538+
proto.MESSAGE,
539+
number=26,
540+
message=model_monitoring.ModelMonitoringConfig,
541+
)
531542

532543

533544
__all__ = tuple(sorted(__protobuf__.manifest))

google/cloud/aiplatform_v1beta1/types/model_monitoring.py

+38
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
__protobuf__ = proto.module(
2222
package="google.cloud.aiplatform.v1beta1",
2323
manifest={
24+
"ModelMonitoringConfig",
2425
"ModelMonitoringObjectiveConfig",
2526
"ModelMonitoringAlertConfig",
2627
"ThresholdConfig",
@@ -29,6 +30,43 @@
2930
)
3031

3132

33+
class ModelMonitoringConfig(proto.Message):
34+
r"""Next ID: 5
35+
36+
Attributes:
37+
objective_configs (Sequence[google.cloud.aiplatform_v1beta1.types.ModelMonitoringObjectiveConfig]):
38+
Model monitoring objective config.
39+
alert_config (google.cloud.aiplatform_v1beta1.types.ModelMonitoringAlertConfig):
40+
Model monitoring alert config.
41+
analysis_instance_schema_uri (str):
42+
YAML schema file uri in Cloud Storage
43+
describing the format of a single instance that
44+
you want Tensorflow Data Validation (TFDV) to
45+
analyze.
46+
If there are any data type differences between
47+
predict instance and TFDV instance, this field
48+
can be used to override the schema. For models
49+
trained with Vertex AI, this field must be set
50+
as all the fields in predict instance formatted
51+
as string.
52+
"""
53+
54+
objective_configs = proto.RepeatedField(
55+
proto.MESSAGE,
56+
number=3,
57+
message="ModelMonitoringObjectiveConfig",
58+
)
59+
alert_config = proto.Field(
60+
proto.MESSAGE,
61+
number=2,
62+
message="ModelMonitoringAlertConfig",
63+
)
64+
analysis_instance_schema_uri = proto.Field(
65+
proto.STRING,
66+
number=4,
67+
)
68+
69+
3270
class ModelMonitoringObjectiveConfig(proto.Message):
3371
r"""Next ID: 8
3472

0 commit comments

Comments
 (0)