Skip to content

Commit

Permalink
feat: add model_monitoring_config to BatchPredictionJob in aiplatform…
Browse files Browse the repository at this point in the history
… 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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Jun 22, 2022
1 parent 1c198f1 commit d35df58
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 0 deletions.
2 changes: 2 additions & 0 deletions google/cloud/aiplatform_v1beta1/__init__.py
Expand Up @@ -344,6 +344,7 @@
from .types.model_evaluation import ModelEvaluation
from .types.model_evaluation_slice import ModelEvaluationSlice
from .types.model_monitoring import ModelMonitoringAlertConfig
from .types.model_monitoring import ModelMonitoringConfig
from .types.model_monitoring import ModelMonitoringObjectiveConfig
from .types.model_monitoring import SamplingStrategy
from .types.model_monitoring import ThresholdConfig
Expand Down Expand Up @@ -841,6 +842,7 @@
"ModelEvaluationSlice",
"ModelExplanation",
"ModelMonitoringAlertConfig",
"ModelMonitoringConfig",
"ModelMonitoringObjectiveConfig",
"ModelMonitoringStatsAnomalies",
"ModelServiceClient",
Expand Down
2 changes: 2 additions & 0 deletions google/cloud/aiplatform_v1beta1/types/__init__.py
Expand Up @@ -395,6 +395,7 @@
)
from .model_monitoring import (
ModelMonitoringAlertConfig,
ModelMonitoringConfig,
ModelMonitoringObjectiveConfig,
SamplingStrategy,
ThresholdConfig,
Expand Down Expand Up @@ -878,6 +879,7 @@
"ModelEvaluation",
"ModelEvaluationSlice",
"ModelMonitoringAlertConfig",
"ModelMonitoringConfig",
"ModelMonitoringObjectiveConfig",
"SamplingStrategy",
"ThresholdConfig",
Expand Down
11 changes: 11 additions & 0 deletions google/cloud/aiplatform_v1beta1/types/batch_prediction_job.py
Expand Up @@ -26,6 +26,7 @@
from google.cloud.aiplatform_v1beta1.types import (
manual_batch_tuning_parameters as gca_manual_batch_tuning_parameters,
)
from google.cloud.aiplatform_v1beta1.types import model_monitoring
from google.cloud.aiplatform_v1beta1.types import (
unmanaged_container_model as gca_unmanaged_container_model,
)
Expand Down Expand Up @@ -214,6 +215,11 @@ class BatchPredictionJob(proto.Message):
BatchPredictionJob. If this is set, then all
resources created by the BatchPredictionJob will
be encrypted with the provided encryption key.
model_monitoring_config (google.cloud.aiplatform_v1beta1.types.ModelMonitoringConfig):
Model monitoring config will be used for
analysis model behaviors, based on the input and
output to the batch prediction job, as well as
the provided training dataset.
"""

class InputConfig(proto.Message):
Expand Down Expand Up @@ -528,6 +534,11 @@ class OutputInfo(proto.Message):
number=24,
message=gca_encryption_spec.EncryptionSpec,
)
model_monitoring_config = proto.Field(
proto.MESSAGE,
number=26,
message=model_monitoring.ModelMonitoringConfig,
)


__all__ = tuple(sorted(__protobuf__.manifest))
38 changes: 38 additions & 0 deletions google/cloud/aiplatform_v1beta1/types/model_monitoring.py
Expand Up @@ -21,6 +21,7 @@
__protobuf__ = proto.module(
package="google.cloud.aiplatform.v1beta1",
manifest={
"ModelMonitoringConfig",
"ModelMonitoringObjectiveConfig",
"ModelMonitoringAlertConfig",
"ThresholdConfig",
Expand All @@ -29,6 +30,43 @@
)


class ModelMonitoringConfig(proto.Message):
r"""Next ID: 5
Attributes:
objective_configs (Sequence[google.cloud.aiplatform_v1beta1.types.ModelMonitoringObjectiveConfig]):
Model monitoring objective config.
alert_config (google.cloud.aiplatform_v1beta1.types.ModelMonitoringAlertConfig):
Model monitoring alert config.
analysis_instance_schema_uri (str):
YAML schema file uri in Cloud Storage
describing the format of a single instance that
you want Tensorflow Data Validation (TFDV) to
analyze.
If there are any data type differences between
predict instance and TFDV instance, this field
can be used to override the schema. For models
trained with Vertex AI, this field must be set
as all the fields in predict instance formatted
as string.
"""

objective_configs = proto.RepeatedField(
proto.MESSAGE,
number=3,
message="ModelMonitoringObjectiveConfig",
)
alert_config = proto.Field(
proto.MESSAGE,
number=2,
message="ModelMonitoringAlertConfig",
)
analysis_instance_schema_uri = proto.Field(
proto.STRING,
number=4,
)


class ModelMonitoringObjectiveConfig(proto.Message):
r"""Next ID: 8
Expand Down

0 comments on commit d35df58

Please sign in to comment.