Debian Codegraph @

docs/dyn/aiplatform_v1beta1.projects.locations.modelDeploymentMonitoringJobs.html

raw
1 <html><body>
2 <style>
3
4 body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13 }
14
15 body {
16 font-size: 13px;
17 padding: 1em;
18 }
19
20 h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23 }
24
25 h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28 }
29
30 h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34 }
35
36 pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39 }
40
41 pre {
42 margin-top: 0.5em;
43 }
44
45 h1, h2, h3, p {
46 font-family: Arial, sans serif;
47 }
48
49 h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51 }
52
53 .toc_element {
54 margin-top: 0.5em;
55 }
56
57 .firstline {
58 margin-left: 2 em;
59 }
60
61 .method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66 }
67
68 .details {
69 font-weight: bold;
70 font-size: 14px;
71 }
72
73 </style>
74
75 <h1><a href="aiplatform_v1beta1.html">Agent Platform API</a> . <a href="aiplatform_v1beta1.projects.html">projects</a> . <a href="aiplatform_v1beta1.projects.locations.html">locations</a> . <a href="aiplatform_v1beta1.projects.locations.modelDeploymentMonitoringJobs.html">modelDeploymentMonitoringJobs</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="aiplatform_v1beta1.projects.locations.modelDeploymentMonitoringJobs.operations.html">operations()</a></code>
79 </p>
80 <p class="firstline">Returns the operations Resource.</p>
81
82 <p class="toc_element">
83 <code><a href="#close">close()</a></code></p>
84 <p class="firstline">Close httplib2 connections.</p>
85 <p class="toc_element">
86 <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
87 <p class="firstline">Creates a ModelDeploymentMonitoringJob. It will run periodically on a configured interval.</p>
88 <p class="toc_element">
89 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
90 <p class="firstline">Deletes a ModelDeploymentMonitoringJob.</p>
91 <p class="toc_element">
92 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
93 <p class="firstline">Gets a ModelDeploymentMonitoringJob.</p>
94 <p class="toc_element">
95 <code><a href="#list">list(parent, filter=None, pageSize=None, pageToken=None, readMask=None, x__xgafv=None)</a></code></p>
96 <p class="firstline">Lists ModelDeploymentMonitoringJobs in a Location.</p>
97 <p class="toc_element">
98 <code><a href="#list_next">list_next()</a></code></p>
99 <p class="firstline">Retrieves the next page of results.</p>
100 <p class="toc_element">
101 <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
102 <p class="firstline">Updates a ModelDeploymentMonitoringJob.</p>
103 <p class="toc_element">
104 <code><a href="#pause">pause(name, body=None, x__xgafv=None)</a></code></p>
105 <p class="firstline">Pauses a ModelDeploymentMonitoringJob. If the job is running, the server makes a best effort to cancel the job. Will mark ModelDeploymentMonitoringJob.state to 'PAUSED'.</p>
106 <p class="toc_element">
107 <code><a href="#resume">resume(name, body=None, x__xgafv=None)</a></code></p>
108 <p class="firstline">Resumes a paused ModelDeploymentMonitoringJob. It will start to run from next scheduled time. A deleted ModelDeploymentMonitoringJob can't be resumed.</p>
109 <p class="toc_element">
110 <code><a href="#searchModelDeploymentMonitoringStatsAnomalies">searchModelDeploymentMonitoringStatsAnomalies(modelDeploymentMonitoringJob, body=None, x__xgafv=None)</a></code></p>
111 <p class="firstline">Searches Model Monitoring Statistics generated within a given time window.</p>
112 <p class="toc_element">
113 <code><a href="#searchModelDeploymentMonitoringStatsAnomalies_next">searchModelDeploymentMonitoringStatsAnomalies_next()</a></code></p>
114 <p class="firstline">Retrieves the next page of results.</p>
115 <h3>Method Details</h3>
116 <div class="method">
117 <code class="details" id="close">close()</code>
118 <pre>Close httplib2 connections.</pre>
119 </div>
120
121 <div class="method">
122 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
123 <pre>Creates a ModelDeploymentMonitoringJob. It will run periodically on a configured interval.
124
125 Args:
126 parent: string, Required. The parent of the ModelDeploymentMonitoringJob. Format: `projects/{project}/locations/{location}` (required)
127 body: object, The request body.
128 The object takes the form of:
129
130 { # Represents a job that runs periodically to monitor the deployed models in an endpoint. It will analyze the logged training &amp; prediction data to detect any abnormal behaviors.
131 &quot;analysisInstanceSchemaUri&quot;: &quot;A String&quot;, # YAML schema file uri describing the format of a single instance that you want Tensorflow Data Validation (TFDV) to analyze. If this field is empty, all the feature data types are inferred from predict_instance_schema_uri, meaning that TFDV will use the data in the exact format(data type) as prediction request/response. 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.
132 &quot;bigqueryTables&quot;: [ # Output only. The created bigquery tables for the job under customer project. Customer could do their own query &amp; analysis. There could be 4 log tables in maximum: 1. Training data logging predict request/response 2. Serving data logging predict request/response
133 { # ModelDeploymentMonitoringBigQueryTable specifies the BigQuery table name as well as some information of the logs stored in this table.
134 &quot;bigqueryTablePath&quot;: &quot;A String&quot;, # The created BigQuery table to store logs. Customer could do their own query &amp; analysis. Format: `bq://.model_deployment_monitoring_._`
135 &quot;logSource&quot;: &quot;A String&quot;, # The source of log.
136 &quot;logType&quot;: &quot;A String&quot;, # The type of log.
137 &quot;requestResponseLoggingSchemaVersion&quot;: &quot;A String&quot;, # Output only. The schema version of the request/response logging BigQuery table. Default to v1 if unset.
138 },
139 ],
140 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Timestamp when this ModelDeploymentMonitoringJob was created.
141 &quot;displayName&quot;: &quot;A String&quot;, # Required. The user-defined name of the ModelDeploymentMonitoringJob. The name can be up to 128 characters long and can consist of any UTF-8 characters. Display name of a ModelDeploymentMonitoringJob.
142 &quot;enableMonitoringPipelineLogs&quot;: True or False, # If true, the scheduled monitoring pipeline logs are sent to Google Cloud Logging, including pipeline status and anomalies detected. Please note the logs incur cost, which are subject to [Cloud Logging pricing](https://cloud.google.com/logging#pricing).
143 &quot;encryptionSpec&quot;: { # Represents a customer-managed encryption key specification that can be applied to a Vertex AI resource. # Customer-managed encryption key spec for a ModelDeploymentMonitoringJob. If set, this ModelDeploymentMonitoringJob and all sub-resources of this ModelDeploymentMonitoringJob will be secured by this key.
144 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Required. Resource name of the Cloud KMS key used to protect the resource. The Cloud KMS key must be in the same region as the resource. It must have the format `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
145 },
146 &quot;endpoint&quot;: &quot;A String&quot;, # Required. Endpoint resource name. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
147 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. Only populated when the job&#x27;s state is `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.
148 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
149 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
150 {
151 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
152 },
153 ],
154 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
155 },
156 &quot;labels&quot;: { # The labels with user-defined metadata to organize your ModelDeploymentMonitoringJob. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels.
157 &quot;a_key&quot;: &quot;A String&quot;,
158 },
159 &quot;latestMonitoringPipelineMetadata&quot;: { # All metadata of most recent monitoring pipelines. # Output only. Latest triggered monitoring pipeline metadata.
160 &quot;runTime&quot;: &quot;A String&quot;, # The time that most recent monitoring pipelines that is related to this run.
161 &quot;status&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The status of the most recent monitoring pipeline.
162 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
163 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
164 {
165 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
166 },
167 ],
168 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
169 },
170 },
171 &quot;logTtl&quot;: &quot;A String&quot;, # The TTL of BigQuery tables in user projects which stores logs. A day is the basic unit of the TTL and we take the ceil of TTL/86400(a day). e.g. { second: 3600} indicates ttl = 1 day.
172 &quot;loggingSamplingStrategy&quot;: { # Sampling Strategy for logging, can be for both training and prediction dataset. # Required. Sample Strategy for logging.
173 &quot;randomSampleConfig&quot;: { # Requests are randomly selected. # Random sample config. Will support more sampling strategies later.
174 &quot;sampleRate&quot;: 3.14, # Sample rate (0, 1]
175 },
176 },
177 &quot;modelDeploymentMonitoringObjectiveConfigs&quot;: [ # Required. The config for monitoring objectives. This is a per DeployedModel config. Each DeployedModel needs to be configured separately.
178 { # ModelDeploymentMonitoringObjectiveConfig contains the pair of deployed_model_id to ModelMonitoringObjectiveConfig.
179 &quot;deployedModelId&quot;: &quot;A String&quot;, # The DeployedModel ID of the objective config.
180 &quot;objectiveConfig&quot;: { # The objective configuration for model monitoring, including the information needed to detect anomalies for one particular model. # The objective config of for the modelmonitoring job of this deployed model.
181 &quot;explanationConfig&quot;: { # The config for integrating with Vertex Explainable AI. Only applicable if the Model has explanation_spec populated. # The config for integrating with Vertex Explainable AI.
182 &quot;enableFeatureAttributes&quot;: True or False, # If want to analyze the Vertex Explainable AI feature attribute scores or not. If set to true, Vertex AI will log the feature attributions from explain response and do the skew/drift detection for them.
183 &quot;explanationBaseline&quot;: { # Output from BatchPredictionJob for Model Monitoring baseline dataset, which can be used to generate baseline attribution scores. # Predictions generated by the BatchPredictionJob using baseline dataset.
184 &quot;bigquery&quot;: { # The BigQuery location for the output content. # BigQuery location for BatchExplain output.
185 &quot;outputUri&quot;: &quot;A String&quot;, # Required. BigQuery URI to a project or table, up to 2000 characters long. When only the project is specified, the Dataset and Table is created. When the full table reference is specified, the Dataset must exist and table must not exist. Accepted forms: * BigQuery path. For example: `bq://projectId` or `bq://projectId.bqDatasetId` or `bq://projectId.bqDatasetId.bqTableId`.
186 },
187 &quot;gcs&quot;: { # The Google Cloud Storage location where the output is to be written to. # Cloud Storage location for BatchExplain output.
188 &quot;outputUriPrefix&quot;: &quot;A String&quot;, # Required. Google Cloud Storage URI to output directory. If the uri doesn&#x27;t end with &#x27;/&#x27;, a &#x27;/&#x27; will be automatically appended. The directory is created if it doesn&#x27;t exist.
189 },
190 &quot;predictionFormat&quot;: &quot;A String&quot;, # The storage format of the predictions generated BatchPrediction job.
191 },
192 },
193 &quot;predictionDriftDetectionConfig&quot;: { # The config for Prediction data drift detection. # The config for drift of prediction data.
194 &quot;attributionScoreDriftThresholds&quot;: { # Key is the feature name and value is the threshold. The threshold here is against attribution score distance between different time windows.
195 &quot;a_key&quot;: { # The config for feature monitoring threshold.
196 &quot;value&quot;: 3.14, # Specify a threshold value that can trigger the alert. If this threshold config is for feature distribution distance: 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.
197 },
198 },
199 &quot;defaultDriftThreshold&quot;: { # The config for feature monitoring threshold. # Drift anomaly detection threshold used by all features. When the per-feature thresholds are not set, this field can be used to specify a threshold for all features.
200 &quot;value&quot;: 3.14, # Specify a threshold value that can trigger the alert. If this threshold config is for feature distribution distance: 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.
201 },
202 &quot;driftThresholds&quot;: { # Key is the feature name and value is the threshold. If a feature needs to be monitored for drift, a value threshold must be configured for that feature. The threshold here is against feature distribution distance between different time windws.
203 &quot;a_key&quot;: { # The config for feature monitoring threshold.
204 &quot;value&quot;: 3.14, # Specify a threshold value that can trigger the alert. If this threshold config is for feature distribution distance: 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.
205 },
206 },
207 },
208 &quot;trainingDataset&quot;: { # Training Dataset information. # Training dataset for models. This field has to be set only if TrainingPredictionSkewDetectionConfig is specified.
209 &quot;bigquerySource&quot;: { # The BigQuery location for the input content. # The BigQuery table of the unmanaged Dataset used to train this Model.
210 &quot;inputUri&quot;: &quot;A String&quot;, # Required. BigQuery URI to a table, up to 2000 characters long. Accepted forms: * BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`.
211 },
212 &quot;dataFormat&quot;: &quot;A String&quot;, # Data format of the dataset, only applicable if the input is from Google Cloud Storage. The possible formats are: &quot;tf-record&quot; The source file is a TFRecord file. &quot;csv&quot; The source file is a CSV file. &quot;jsonl&quot; The source file is a JSONL file.
213 &quot;dataset&quot;: &quot;A String&quot;, # The resource name of the Dataset used to train this Model.
214 &quot;gcsSource&quot;: { # The Google Cloud Storage location for the input content. # The Google Cloud Storage uri of the unmanaged Dataset used to train this Model.
215 &quot;uris&quot;: [ # Required. Google Cloud Storage URI(-s) to the input file(s). May contain wildcards. For more information on wildcards, see https://cloud.google.com/storage/docs/wildcards.
216 &quot;A String&quot;,
217 ],
218 },
219 &quot;loggingSamplingStrategy&quot;: { # Sampling Strategy for logging, can be for both training and prediction dataset. # Strategy to sample data from Training Dataset. If not set, we process the whole dataset.
220 &quot;randomSampleConfig&quot;: { # Requests are randomly selected. # Random sample config. Will support more sampling strategies later.
221 &quot;sampleRate&quot;: 3.14, # Sample rate (0, 1]
222 },
223 },
224 &quot;targetField&quot;: &quot;A String&quot;, # The target field name the model is to predict. This field will be excluded when doing Predict and (or) Explain for the training data.
225 },
226 &quot;trainingPredictionSkewDetectionConfig&quot;: { # The config for Training &amp; Prediction data skew detection. It specifies the training dataset sources and the skew detection parameters. # The config for skew between training data and prediction data.
227 &quot;attributionScoreSkewThresholds&quot;: { # Key is the feature name and value is the threshold. The threshold here is against attribution score distance between the training and prediction feature.
228 &quot;a_key&quot;: { # The config for feature monitoring threshold.
229 &quot;value&quot;: 3.14, # Specify a threshold value that can trigger the alert. If this threshold config is for feature distribution distance: 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.
230 },
231 },
232 &quot;defaultSkewThreshold&quot;: { # The config for feature monitoring threshold. # Skew anomaly detection threshold used by all features. When the per-feature thresholds are not set, this field can be used to specify a threshold for all features.
233 &quot;value&quot;: 3.14, # Specify a threshold value that can trigger the alert. If this threshold config is for feature distribution distance: 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.
234 },
235 &quot;skewThresholds&quot;: { # Key is the feature name and value is the threshold. If a feature needs to be monitored for skew, a value threshold must be configured for that feature. The threshold here is against feature distribution distance between the training and prediction feature.
236 &quot;a_key&quot;: { # The config for feature monitoring threshold.
237 &quot;value&quot;: 3.14, # Specify a threshold value that can trigger the alert. If this threshold config is for feature distribution distance: 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.
238 },
239 },
240 },
241 },
242 },
243 ],
244 &quot;modelDeploymentMonitoringScheduleConfig&quot;: { # The config for scheduling monitoring job. # Required. Schedule config for running the monitoring job.
245 &quot;monitorInterval&quot;: &quot;A String&quot;, # Required. The model monitoring job scheduling interval. It will be rounded up to next full hour. This defines how often the monitoring jobs are triggered.
246 &quot;monitorWindow&quot;: &quot;A String&quot;, # The time window of the prediction data being included in each prediction dataset. This window specifies how long the data should be collected from historical model results for each run. If not set, ModelDeploymentMonitoringScheduleConfig.monitor_interval will be used. e.g. If currently the cutoff time is 2022-01-08 14:30:00 and the monitor_window is set to be 3600, then data from 2022-01-08 13:30:00 to 2022-01-08 14:30:00 will be retrieved and aggregated to calculate the monitoring statistics.
247 },
248 &quot;modelMonitoringAlertConfig&quot;: { # The alert config for model monitoring. # Alert config for model monitoring.
249 &quot;emailAlertConfig&quot;: { # The config for email alert. # Email alert config.
250 &quot;userEmails&quot;: [ # The email addresses to send the alert.
251 &quot;A String&quot;,
252 ],
253 },
254 &quot;enableLogging&quot;: True or False, # Dump the anomalies to Cloud Logging. The anomalies will be put to json payload encoded from proto ModelMonitoringStatsAnomalies. This can be further synced to Pub/Sub or any other services supported by Cloud Logging.
255 &quot;notificationChannels&quot;: [ # Resource names of the NotificationChannels to send alert. Must be of the format `projects//notificationChannels/`
256 &quot;A String&quot;,
257 ],
258 },
259 &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of a ModelDeploymentMonitoringJob.
260 &quot;nextScheduleTime&quot;: &quot;A String&quot;, # Output only. Timestamp when this monitoring pipeline will be scheduled to run for the next round.
261 &quot;predictInstanceSchemaUri&quot;: &quot;A String&quot;, # YAML schema file uri describing the format of a single instance, which are given to format this Endpoint&#x27;s prediction (and explanation). If not set, we will generate predict schema from collected predict requests.
262 &quot;samplePredictInstance&quot;: &quot;&quot;, # Sample Predict instance, same format as PredictRequest.instances, this can be set as a replacement of ModelDeploymentMonitoringJob.predict_instance_schema_uri. If not set, we will generate predict schema from collected predict requests.
263 &quot;satisfiesPzi&quot;: True or False, # Output only. Reserved for future use.
264 &quot;satisfiesPzs&quot;: True or False, # Output only. Reserved for future use.
265 &quot;scheduleState&quot;: &quot;A String&quot;, # Output only. Schedule state when the monitoring job is in Running state.
266 &quot;state&quot;: &quot;A String&quot;, # Output only. The detailed state of the monitoring job. When the job is still creating, the state will be &#x27;PENDING&#x27;. Once the job is successfully created, the state will be &#x27;RUNNING&#x27;. Pause the job, the state will be &#x27;PAUSED&#x27;. Resume the job, the state will return to &#x27;RUNNING&#x27;.
267 &quot;statsAnomaliesBaseDirectory&quot;: { # The Google Cloud Storage location where the output is to be written to. # Stats anomalies base folder path.
268 &quot;outputUriPrefix&quot;: &quot;A String&quot;, # Required. Google Cloud Storage URI to output directory. If the uri doesn&#x27;t end with &#x27;/&#x27;, a &#x27;/&#x27; will be automatically appended. The directory is created if it doesn&#x27;t exist.
269 },
270 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Timestamp when this ModelDeploymentMonitoringJob was updated most recently.
271 }
272
273 x__xgafv: string, V1 error format.
274 Allowed values
275 1 - v1 error format
276 2 - v2 error format
277
278 Returns:
279 An object of the form:
280
281 { # Represents a job that runs periodically to monitor the deployed models in an endpoint. It will analyze the logged training &amp; prediction data to detect any abnormal behaviors.
282 &quot;analysisInstanceSchemaUri&quot;: &quot;A String&quot;, # YAML schema file uri describing the format of a single instance that you want Tensorflow Data Validation (TFDV) to analyze. If this field is empty, all the feature data types are inferred from predict_instance_schema_uri, meaning that TFDV will use the data in the exact format(data type) as prediction request/response. 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.
283 &quot;bigqueryTables&quot;: [ # Output only. The created bigquery tables for the job under customer project. Customer could do their own query &amp; analysis. There could be 4 log tables in maximum: 1. Training data logging predict request/response 2. Serving data logging predict request/response
284 { # ModelDeploymentMonitoringBigQueryTable specifies the BigQuery table name as well as some information of the logs stored in this table.
285 &quot;bigqueryTablePath&quot;: &quot;A String&quot;, # The created BigQuery table to store logs. Customer could do their own query &amp; analysis. Format: `bq://.model_deployment_monitoring_._`
286 &quot;logSource&quot;: &quot;A String&quot;, # The source of log.
287 &quot;logType&quot;: &quot;A String&quot;, # The type of log.
288 &quot;requestResponseLoggingSchemaVersion&quot;: &quot;A String&quot;, # Output only. The schema version of the request/response logging BigQuery table. Default to v1 if unset.
289 },
290 ],
291 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Timestamp when this ModelDeploymentMonitoringJob was created.
292 &quot;displayName&quot;: &quot;A String&quot;, # Required. The user-defined name of the ModelDeploymentMonitoringJob. The name can be up to 128 characters long and can consist of any UTF-8 characters. Display name of a ModelDeploymentMonitoringJob.
293 &quot;enableMonitoringPipelineLogs&quot;: True or False, # If true, the scheduled monitoring pipeline logs are sent to Google Cloud Logging, including pipeline status and anomalies detected. Please note the logs incur cost, which are subject to [Cloud Logging pricing](https://cloud.google.com/logging#pricing).
294 &quot;encryptionSpec&quot;: { # Represents a customer-managed encryption key specification that can be applied to a Vertex AI resource. # Customer-managed encryption key spec for a ModelDeploymentMonitoringJob. If set, this ModelDeploymentMonitoringJob and all sub-resources of this ModelDeploymentMonitoringJob will be secured by this key.
295 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Required. Resource name of the Cloud KMS key used to protect the resource. The Cloud KMS key must be in the same region as the resource. It must have the format `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
296 },
297 &quot;endpoint&quot;: &quot;A String&quot;, # Required. Endpoint resource name. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
298 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. Only populated when the job&#x27;s state is `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.
299 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
300 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
301 {
302 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
303 },
304 ],
305 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
306 },
307 &quot;labels&quot;: { # The labels with user-defined metadata to organize your ModelDeploymentMonitoringJob. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels.
308 &quot;a_key&quot;: &quot;A String&quot;,
309 },
310 &quot;latestMonitoringPipelineMetadata&quot;: { # All metadata of most recent monitoring pipelines. # Output only. Latest triggered monitoring pipeline metadata.
311 &quot;runTime&quot;: &quot;A String&quot;, # The time that most recent monitoring pipelines that is related to this run.
312 &quot;status&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The status of the most recent monitoring pipeline.
313 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
314 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
315 {
316 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
317 },
318 ],
319 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
320 },
321 },
322 &quot;logTtl&quot;: &quot;A String&quot;, # The TTL of BigQuery tables in user projects which stores logs. A day is the basic unit of the TTL and we take the ceil of TTL/86400(a day). e.g. { second: 3600} indicates ttl = 1 day.
323 &quot;loggingSamplingStrategy&quot;: { # Sampling Strategy for logging, can be for both training and prediction dataset. # Required. Sample Strategy for logging.
324 &quot;randomSampleConfig&quot;: { # Requests are randomly selected. # Random sample config. Will support more sampling strategies later.
325 &quot;sampleRate&quot;: 3.14, # Sample rate (0, 1]
326 },
327 },
328 &quot;modelDeploymentMonitoringObjectiveConfigs&quot;: [ # Required. The config for monitoring objectives. This is a per DeployedModel config. Each DeployedModel needs to be configured separately.
329 { # ModelDeploymentMonitoringObjectiveConfig contains the pair of deployed_model_id to ModelMonitoringObjectiveConfig.
330 &quot;deployedModelId&quot;: &quot;A String&quot;, # The DeployedModel ID of the objective config.
331 &quot;objectiveConfig&quot;: { # The objective configuration for model monitoring, including the information needed to detect anomalies for one particular model. # The objective config of for the modelmonitoring job of this deployed model.
332 &quot;explanationConfig&quot;: { # The config for integrating with Vertex Explainable AI. Only applicable if the Model has explanation_spec populated. # The config for integrating with Vertex Explainable AI.
333 &quot;enableFeatureAttributes&quot;: True or False, # If want to analyze the Vertex Explainable AI feature attribute scores or not. If set to true, Vertex AI will log the feature attributions from explain response and do the skew/drift detection for them.
334 &quot;explanationBaseline&quot;: { # Output from BatchPredictionJob for Model Monitoring baseline dataset, which can be used to generate baseline attribution scores. # Predictions generated by the BatchPredictionJob using baseline dataset.
335 &quot;bigquery&quot;: { # The BigQuery location for the output content. # BigQuery location for BatchExplain output.
336 &quot;outputUri&quot;: &quot;A String&quot;, # Required. BigQuery URI to a project or table, up to 2000 characters long. When only the project is specified, the Dataset and Table is created. When the full table reference is specified, the Dataset must exist and table must not exist. Accepted forms: * BigQuery path. For example: `bq://projectId` or `bq://projectId.bqDatasetId` or `bq://projectId.bqDatasetId.bqTableId`.
337 },
338 &quot;gcs&quot;: { # The Google Cloud Storage location where the output is to be written to. # Cloud Storage location for BatchExplain output.
339 &quot;outputUriPrefix&quot;: &quot;A String&quot;, # Required. Google Cloud Storage URI to output directory. If the uri doesn&#x27;t end with &#x27;/&#x27;, a &#x27;/&#x27; will be automatically appended. The directory is created if it doesn&#x27;t exist.
340 },
341 &quot;predictionFormat&quot;: &quot;A String&quot;, # The storage format of the predictions generated BatchPrediction job.
342 },
343 },
344 &quot;predictionDriftDetectionConfig&quot;: { # The config for Prediction data drift detection. # The config for drift of prediction data.
345 &quot;attributionScoreDriftThresholds&quot;: { # Key is the feature name and value is the threshold. The threshold here is against attribution score distance between different time windows.
346 &quot;a_key&quot;: { # The config for feature monitoring threshold.
347 &quot;value&quot;: 3.14, # Specify a threshold value that can trigger the alert. If this threshold config is for feature distribution distance: 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.
348 },
349 },
350 &quot;defaultDriftThreshold&quot;: { # The config for feature monitoring threshold. # Drift anomaly detection threshold used by all features. When the per-feature thresholds are not set, this field can be used to specify a threshold for all features.
351 &quot;value&quot;: 3.14, # Specify a threshold value that can trigger the alert. If this threshold config is for feature distribution distance: 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.
352 },
353 &quot;driftThresholds&quot;: { # Key is the feature name and value is the threshold. If a feature needs to be monitored for drift, a value threshold must be configured for that feature. The threshold here is against feature distribution distance between different time windws.
354 &quot;a_key&quot;: { # The config for feature monitoring threshold.
355 &quot;value&quot;: 3.14, # Specify a threshold value that can trigger the alert. If this threshold config is for feature distribution distance: 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.
356 },
357 },
358 },
359 &quot;trainingDataset&quot;: { # Training Dataset information. # Training dataset for models. This field has to be set only if TrainingPredictionSkewDetectionConfig is specified.
360 &quot;bigquerySource&quot;: { # The BigQuery location for the input content. # The BigQuery table of the unmanaged Dataset used to train this Model.
361 &quot;inputUri&quot;: &quot;A String&quot;, # Required. BigQuery URI to a table, up to 2000 characters long. Accepted forms: * BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`.
362 },
363 &quot;dataFormat&quot;: &quot;A String&quot;, # Data format of the dataset, only applicable if the input is from Google Cloud Storage. The possible formats are: &quot;tf-record&quot; The source file is a TFRecord file. &quot;csv&quot; The source file is a CSV file. &quot;jsonl&quot; The source file is a JSONL file.
364 &quot;dataset&quot;: &quot;A String&quot;, # The resource name of the Dataset used to train this Model.
365 &quot;gcsSource&quot;: { # The Google Cloud Storage location for the input content. # The Google Cloud Storage uri of the unmanaged Dataset used to train this Model.
366 &quot;uris&quot;: [ # Required. Google Cloud Storage URI(-s) to the input file(s). May contain wildcards. For more information on wildcards, see https://cloud.google.com/storage/docs/wildcards.
367 &quot;A String&quot;,
368 ],
369 },
370 &quot;loggingSamplingStrategy&quot;: { # Sampling Strategy for logging, can be for both training and prediction dataset. # Strategy to sample data from Training Dataset. If not set, we process the whole dataset.
371 &quot;randomSampleConfig&quot;: { # Requests are randomly selected. # Random sample config. Will support more sampling strategies later.
372 &quot;sampleRate&quot;: 3.14, # Sample rate (0, 1]
373 },
374 },
375 &quot;targetField&quot;: &quot;A String&quot;, # The target field name the model is to predict. This field will be excluded when doing Predict and (or) Explain for the training data.
376 },
377 &quot;trainingPredictionSkewDetectionConfig&quot;: { # The config for Training &amp; Prediction data skew detection. It specifies the training dataset sources and the skew detection parameters. # The config for skew between training data and prediction data.
378 &quot;attributionScoreSkewThresholds&quot;: { # Key is the feature name and value is the threshold. The threshold here is against attribution score distance between the training and prediction feature.
379 &quot;a_key&quot;: { # The config for feature monitoring threshold.
380 &quot;value&quot;: 3.14, # Specify a threshold value that can trigger the alert. If this threshold config is for feature distribution distance: 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.
381 },
382 },
383 &quot;defaultSkewThreshold&quot;: { # The config for feature monitoring threshold. # Skew anomaly detection threshold used by all features. When the per-feature thresholds are not set, this field can be used to specify a threshold for all features.
384 &quot;value&quot;: 3.14, # Specify a threshold value that can trigger the alert. If this threshold config is for feature distribution distance: 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.
385 },
386 &quot;skewThresholds&quot;: { # Key is the feature name and value is the threshold. If a feature needs to be monitored for skew, a value threshold must be configured for that feature. The threshold here is against feature distribution distance between the training and prediction feature.
387 &quot;a_key&quot;: { # The config for feature monitoring threshold.
388 &quot;value&quot;: 3.14, # Specify a threshold value that can trigger the alert. If this threshold config is for feature distribution distance: 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.
389 },
390 },
391 },
392 },
393 },
394 ],
395 &quot;modelDeploymentMonitoringScheduleConfig&quot;: { # The config for scheduling monitoring job. # Required. Schedule config for running the monitoring job.
396 &quot;monitorInterval&quot;: &quot;A String&quot;, # Required. The model monitoring job scheduling interval. It will be rounded up to next full hour. This defines how often the monitoring jobs are triggered.
397 &quot;monitorWindow&quot;: &quot;A String&quot;, # The time window of the prediction data being included in each prediction dataset. This window specifies how long the data should be collected from historical model results for each run. If not set, ModelDeploymentMonitoringScheduleConfig.monitor_interval will be used. e.g. If currently the cutoff time is 2022-01-08 14:30:00 and the monitor_window is set to be 3600, then data from 2022-01-08 13:30:00 to 2022-01-08 14:30:00 will be retrieved and aggregated to calculate the monitoring statistics.
398 },
399 &quot;modelMonitoringAlertConfig&quot;: { # The alert config for model monitoring. # Alert config for model monitoring.
400 &quot;emailAlertConfig&quot;: { # The config for email alert. # Email alert config.
401 &quot;userEmails&quot;: [ # The email addresses to send the alert.
402 &quot;A String&quot;,
403 ],
404 },
405 &quot;enableLogging&quot;: True or False, # Dump the anomalies to Cloud Logging. The anomalies will be put to json payload encoded from proto ModelMonitoringStatsAnomalies. This can be further synced to Pub/Sub or any other services supported by Cloud Logging.
406 &quot;notificationChannels&quot;: [ # Resource names of the NotificationChannels to send alert. Must be of the format `projects//notificationChannels/`
407 &quot;A String&quot;,
408 ],
409 },
410 &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of a ModelDeploymentMonitoringJob.
411 &quot;nextScheduleTime&quot;: &quot;A String&quot;, # Output only. Timestamp when this monitoring pipeline will be scheduled to run for the next round.
412 &quot;predictInstanceSchemaUri&quot;: &quot;A String&quot;, # YAML schema file uri describing the format of a single instance, which are given to format this Endpoint&#x27;s prediction (and explanation). If not set, we will generate predict schema from collected predict requests.
413 &quot;samplePredictInstance&quot;: &quot;&quot;, # Sample Predict instance, same format as PredictRequest.instances, this can be set as a replacement of ModelDeploymentMonitoringJob.predict_instance_schema_uri. If not set, we will generate predict schema from collected predict requests.
414 &quot;satisfiesPzi&quot;: True or False, # Output only. Reserved for future use.
415 &quot;satisfiesPzs&quot;: True or False, # Output only. Reserved for future use.
416 &quot;scheduleState&quot;: &quot;A String&quot;, # Output only. Schedule state when the monitoring job is in Running state.
417 &quot;state&quot;: &quot;A String&quot;, # Output only. The detailed state of the monitoring job. When the job is still creating, the state will be &#x27;PENDING&#x27;. Once the job is successfully created, the state will be &#x27;RUNNING&#x27;. Pause the job, the state will be &#x27;PAUSED&#x27;. Resume the job, the state will return to &#x27;RUNNING&#x27;.
418 &quot;statsAnomaliesBaseDirectory&quot;: { # The Google Cloud Storage location where the output is to be written to. # Stats anomalies base folder path.
419 &quot;outputUriPrefix&quot;: &quot;A String&quot;, # Required. Google Cloud Storage URI to output directory. If the uri doesn&#x27;t end with &#x27;/&#x27;, a &#x27;/&#x27; will be automatically appended. The directory is created if it doesn&#x27;t exist.
420 },
421 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Timestamp when this ModelDeploymentMonitoringJob was updated most recently.
422 }</pre>
423 </div>
424
425 <div class="method">
426 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
427 <pre>Deletes a ModelDeploymentMonitoringJob.
428
429 Args:
430 name: string, Required. The resource name of the model monitoring job to delete. Format: `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}` (required)
431 x__xgafv: string, V1 error format.
432 Allowed values
433 1 - v1 error format
434 2 - v2 error format
435
436 Returns:
437 An object of the form:
438
439 { # This resource represents a long-running operation that is the result of a network API call.
440 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
441 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
442 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
443 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
444 {
445 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
446 },
447 ],
448 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
449 },
450 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
451 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
452 },
453 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
454 &quot;response&quot;: { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
455 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
456 },
457 }</pre>
458 </div>
459
460 <div class="method">
461 <code class="details" id="get">get(name, x__xgafv=None)</code>
462 <pre>Gets a ModelDeploymentMonitoringJob.
463
464 Args:
465 name: string, Required. The resource name of the ModelDeploymentMonitoringJob. Format: `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}` (required)
466 x__xgafv: string, V1 error format.
467 Allowed values
468 1 - v1 error format
469 2 - v2 error format
470
471 Returns:
472 An object of the form:
473
474 { # Represents a job that runs periodically to monitor the deployed models in an endpoint. It will analyze the logged training &amp; prediction data to detect any abnormal behaviors.
475 &quot;analysisInstanceSchemaUri&quot;: &quot;A String&quot;, # YAML schema file uri describing the format of a single instance that you want Tensorflow Data Validation (TFDV) to analyze. If this field is empty, all the feature data types are inferred from predict_instance_schema_uri, meaning that TFDV will use the data in the exact format(data type) as prediction request/response. 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.
476 &quot;bigqueryTables&quot;: [ # Output only. The created bigquery tables for the job under customer project. Customer could do their own query &amp; analysis. There could be 4 log tables in maximum: 1. Training data logging predict request/response 2. Serving data logging predict request/response
477 { # ModelDeploymentMonitoringBigQueryTable specifies the BigQuery table name as well as some information of the logs stored in this table.
478 &quot;bigqueryTablePath&quot;: &quot;A String&quot;, # The created BigQuery table to store logs. Customer could do their own query &amp; analysis. Format: `bq://.model_deployment_monitoring_._`
479 &quot;logSource&quot;: &quot;A String&quot;, # The source of log.
480 &quot;logType&quot;: &quot;A String&quot;, # The type of log.
481 &quot;requestResponseLoggingSchemaVersion&quot;: &quot;A String&quot;, # Output only. The schema version of the request/response logging BigQuery table. Default to v1 if unset.
482 },
483 ],
484 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Timestamp when this ModelDeploymentMonitoringJob was created.
485 &quot;displayName&quot;: &quot;A String&quot;, # Required. The user-defined name of the ModelDeploymentMonitoringJob. The name can be up to 128 characters long and can consist of any UTF-8 characters. Display name of a ModelDeploymentMonitoringJob.
486 &quot;enableMonitoringPipelineLogs&quot;: True or False, # If true, the scheduled monitoring pipeline logs are sent to Google Cloud Logging, including pipeline status and anomalies detected. Please note the logs incur cost, which are subject to [Cloud Logging pricing](https://cloud.google.com/logging#pricing).
487 &quot;encryptionSpec&quot;: { # Represents a customer-managed encryption key specification that can be applied to a Vertex AI resource. # Customer-managed encryption key spec for a ModelDeploymentMonitoringJob. If set, this ModelDeploymentMonitoringJob and all sub-resources of this ModelDeploymentMonitoringJob will be secured by this key.
488 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Required. Resource name of the Cloud KMS key used to protect the resource. The Cloud KMS key must be in the same region as the resource. It must have the format `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
489 },
490 &quot;endpoint&quot;: &quot;A String&quot;, # Required. Endpoint resource name. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
491 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. Only populated when the job&#x27;s state is `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.
492 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
493 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
494 {
495 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
496 },
497 ],
498 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
499 },
500 &quot;labels&quot;: { # The labels with user-defined metadata to organize your ModelDeploymentMonitoringJob. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels.
501 &quot;a_key&quot;: &quot;A String&quot;,
502 },
503 &quot;latestMonitoringPipelineMetadata&quot;: { # All metadata of most recent monitoring pipelines. # Output only. Latest triggered monitoring pipeline metadata.
504 &quot;runTime&quot;: &quot;A String&quot;, # The time that most recent monitoring pipelines that is related to this run.
505 &quot;status&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The status of the most recent monitoring pipeline.
506 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
507 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
508 {
509 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
510 },
511 ],
512 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
513 },
514 },
515 &quot;logTtl&quot;: &quot;A String&quot;, # The TTL of BigQuery tables in user projects which stores logs. A day is the basic unit of the TTL and we take the ceil of TTL/86400(a day). e.g. { second: 3600} indicates ttl = 1 day.
516 &quot;loggingSamplingStrategy&quot;: { # Sampling Strategy for logging, can be for both training and prediction dataset. # Required. Sample Strategy for logging.
517 &quot;randomSampleConfig&quot;: { # Requests are randomly selected. # Random sample config. Will support more sampling strategies later.
518 &quot;sampleRate&quot;: 3.14, # Sample rate (0, 1]
519 },
520 },
521 &quot;modelDeploymentMonitoringObjectiveConfigs&quot;: [ # Required. The config for monitoring objectives. This is a per DeployedModel config. Each DeployedModel needs to be configured separately.
522 { # ModelDeploymentMonitoringObjectiveConfig contains the pair of deployed_model_id to ModelMonitoringObjectiveConfig.
523 &quot;deployedModelId&quot;: &quot;A String&quot;, # The DeployedModel ID of the objective config.
524 &quot;objectiveConfig&quot;: { # The objective configuration for model monitoring, including the information needed to detect anomalies for one particular model. # The objective config of for the modelmonitoring job of this deployed model.
525 &quot;explanationConfig&quot;: { # The config for integrating with Vertex Explainable AI. Only applicable if the Model has explanation_spec populated. # The config for integrating with Vertex Explainable AI.
526 &quot;enableFeatureAttributes&quot;: True or False, # If want to analyze the Vertex Explainable AI feature attribute scores or not. If set to true, Vertex AI will log the feature attributions from explain response and do the skew/drift detection for them.
527 &quot;explanationBaseline&quot;: { # Output from BatchPredictionJob for Model Monitoring baseline dataset, which can be used to generate baseline attribution scores. # Predictions generated by the BatchPredictionJob using baseline dataset.
528 &quot;bigquery&quot;: { # The BigQuery location for the output content. # BigQuery location for BatchExplain output.
529 &quot;outputUri&quot;: &quot;A String&quot;, # Required. BigQuery URI to a project or table, up to 2000 characters long. When only the project is specified, the Dataset and Table is created. When the full table reference is specified, the Dataset must exist and table must not exist. Accepted forms: * BigQuery path. For example: `bq://projectId` or `bq://projectId.bqDatasetId` or `bq://projectId.bqDatasetId.bqTableId`.
530 },
531 &quot;gcs&quot;: { # The Google Cloud Storage location where the output is to be written to. # Cloud Storage location for BatchExplain output.
532 &quot;outputUriPrefix&quot;: &quot;A String&quot;, # Required. Google Cloud Storage URI to output directory. If the uri doesn&#x27;t end with &#x27;/&#x27;, a &#x27;/&#x27; will be automatically appended. The directory is created if it doesn&#x27;t exist.
533 },
534 &quot;predictionFormat&quot;: &quot;A String&quot;, # The storage format of the predictions generated BatchPrediction job.
535 },
536 },
537 &quot;predictionDriftDetectionConfig&quot;: { # The config for Prediction data drift detection. # The config for drift of prediction data.
538 &quot;attributionScoreDriftThresholds&quot;: { # Key is the feature name and value is the threshold. The threshold here is against attribution score distance between different time windows.
539 &quot;a_key&quot;: { # The config for feature monitoring threshold.
540 &quot;value&quot;: 3.14, # Specify a threshold value that can trigger the alert. If this threshold config is for feature distribution distance: 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.
541 },
542 },
543 &quot;defaultDriftThreshold&quot;: { # The config for feature monitoring threshold. # Drift anomaly detection threshold used by all features. When the per-feature thresholds are not set, this field can be used to specify a threshold for all features.
544 &quot;value&quot;: 3.14, # Specify a threshold value that can trigger the alert. If this threshold config is for feature distribution distance: 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.
545 },
546 &quot;driftThresholds&quot;: { # Key is the feature name and value is the threshold. If a feature needs to be monitored for drift, a value threshold must be configured for that feature. The threshold here is against feature distribution distance between different time windws.
547 &quot;a_key&quot;: { # The config for feature monitoring threshold.
548 &quot;value&quot;: 3.14, # Specify a threshold value that can trigger the alert. If this threshold config is for feature distribution distance: 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.
549 },
550 },
551 },
552 &quot;trainingDataset&quot;: { # Training Dataset information. # Training dataset for models. This field has to be set only if TrainingPredictionSkewDetectionConfig is specified.
553 &quot;bigquerySource&quot;: { # The BigQuery location for the input content. # The BigQuery table of the unmanaged Dataset used to train this Model.
554 &quot;inputUri&quot;: &quot;A String&quot;, # Required. BigQuery URI to a table, up to 2000 characters long. Accepted forms: * BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`.
555 },
556 &quot;dataFormat&quot;: &quot;A String&quot;, # Data format of the dataset, only applicable if the input is from Google Cloud Storage. The possible formats are: &quot;tf-record&quot; The source file is a TFRecord file. &quot;csv&quot; The source file is a CSV file. &quot;jsonl&quot; The source file is a JSONL file.
557 &quot;dataset&quot;: &quot;A String&quot;, # The resource name of the Dataset used to train this Model.
558 &quot;gcsSource&quot;: { # The Google Cloud Storage location for the input content. # The Google Cloud Storage uri of the unmanaged Dataset used to train this Model.
559 &quot;uris&quot;: [ # Required. Google Cloud Storage URI(-s) to the input file(s). May contain wildcards. For more information on wildcards, see https://cloud.google.com/storage/docs/wildcards.
560 &quot;A String&quot;,
561 ],
562 },
563 &quot;loggingSamplingStrategy&quot;: { # Sampling Strategy for logging, can be for both training and prediction dataset. # Strategy to sample data from Training Dataset. If not set, we process the whole dataset.
564 &quot;randomSampleConfig&quot;: { # Requests are randomly selected. # Random sample config. Will support more sampling strategies later.
565 &quot;sampleRate&quot;: 3.14, # Sample rate (0, 1]
566 },
567 },
568 &quot;targetField&quot;: &quot;A String&quot;, # The target field name the model is to predict. This field will be excluded when doing Predict and (or) Explain for the training data.
569 },
570 &quot;trainingPredictionSkewDetectionConfig&quot;: { # The config for Training &amp; Prediction data skew detection. It specifies the training dataset sources and the skew detection parameters. # The config for skew between training data and prediction data.
571 &quot;attributionScoreSkewThresholds&quot;: { # Key is the feature name and value is the threshold. The threshold here is against attribution score distance between the training and prediction feature.
572 &quot;a_key&quot;: { # The config for feature monitoring threshold.
573 &quot;value&quot;: 3.14, # Specify a threshold value that can trigger the alert. If this threshold config is for feature distribution distance: 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.
574 },
575 },
576 &quot;defaultSkewThreshold&quot;: { # The config for feature monitoring threshold. # Skew anomaly detection threshold used by all features. When the per-feature thresholds are not set, this field can be used to specify a threshold for all features.
577 &quot;value&quot;: 3.14, # Specify a threshold value that can trigger the alert. If this threshold config is for feature distribution distance: 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.
578 },
579 &quot;skewThresholds&quot;: { # Key is the feature name and value is the threshold. If a feature needs to be monitored for skew, a value threshold must be configured for that feature. The threshold here is against feature distribution distance between the training and prediction feature.
580 &quot;a_key&quot;: { # The config for feature monitoring threshold.
581 &quot;value&quot;: 3.14, # Specify a threshold value that can trigger the alert. If this threshold config is for feature distribution distance: 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.
582 },
583 },
584 },
585 },
586 },
587 ],
588 &quot;modelDeploymentMonitoringScheduleConfig&quot;: { # The config for scheduling monitoring job. # Required. Schedule config for running the monitoring job.
589 &quot;monitorInterval&quot;: &quot;A String&quot;, # Required. The model monitoring job scheduling interval. It will be rounded up to next full hour. This defines how often the monitoring jobs are triggered.
590 &quot;monitorWindow&quot;: &quot;A String&quot;, # The time window of the prediction data being included in each prediction dataset. This window specifies how long the data should be collected from historical model results for each run. If not set, ModelDeploymentMonitoringScheduleConfig.monitor_interval will be used. e.g. If currently the cutoff time is 2022-01-08 14:30:00 and the monitor_window is set to be 3600, then data from 2022-01-08 13:30:00 to 2022-01-08 14:30:00 will be retrieved and aggregated to calculate the monitoring statistics.
591 },
592 &quot;modelMonitoringAlertConfig&quot;: { # The alert config for model monitoring. # Alert config for model monitoring.
593 &quot;emailAlertConfig&quot;: { # The config for email alert. # Email alert config.
594 &quot;userEmails&quot;: [ # The email addresses to send the alert.
595 &quot;A String&quot;,
596 ],
597 },
598 &quot;enableLogging&quot;: True or False, # Dump the anomalies to Cloud Logging. The anomalies will be put to json payload encoded from proto ModelMonitoringStatsAnomalies. This can be further synced to Pub/Sub or any other services supported by Cloud Logging.
599 &quot;notificationChannels&quot;: [ # Resource names of the NotificationChannels to send alert. Must be of the format `projects//notificationChannels/`
600 &quot;A String&quot;,
601 ],
602 },
603 &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of a ModelDeploymentMonitoringJob.
604 &quot;nextScheduleTime&quot;: &quot;A String&quot;, # Output only. Timestamp when this monitoring pipeline will be scheduled to run for the next round.
605 &quot;predictInstanceSchemaUri&quot;: &quot;A String&quot;, # YAML schema file uri describing the format of a single instance, which are given to format this Endpoint&#x27;s prediction (and explanation). If not set, we will generate predict schema from collected predict requests.
606 &quot;samplePredictInstance&quot;: &quot;&quot;, # Sample Predict instance, same format as PredictRequest.instances, this can be set as a replacement of ModelDeploymentMonitoringJob.predict_instance_schema_uri. If not set, we will generate predict schema from collected predict requests.
607 &quot;satisfiesPzi&quot;: True or False, # Output only. Reserved for future use.
608 &quot;satisfiesPzs&quot;: True or False, # Output only. Reserved for future use.
609 &quot;scheduleState&quot;: &quot;A String&quot;, # Output only. Schedule state when the monitoring job is in Running state.
610 &quot;state&quot;: &quot;A String&quot;, # Output only. The detailed state of the monitoring job. When the job is still creating, the state will be &#x27;PENDING&#x27;. Once the job is successfully created, the state will be &#x27;RUNNING&#x27;. Pause the job, the state will be &#x27;PAUSED&#x27;. Resume the job, the state will return to &#x27;RUNNING&#x27;.
611 &quot;statsAnomaliesBaseDirectory&quot;: { # The Google Cloud Storage location where the output is to be written to. # Stats anomalies base folder path.
612 &quot;outputUriPrefix&quot;: &quot;A String&quot;, # Required. Google Cloud Storage URI to output directory. If the uri doesn&#x27;t end with &#x27;/&#x27;, a &#x27;/&#x27; will be automatically appended. The directory is created if it doesn&#x27;t exist.
613 },
614 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Timestamp when this ModelDeploymentMonitoringJob was updated most recently.
615 }</pre>
616 </div>
617
618 <div class="method">
619 <code class="details" id="list">list(parent, filter=None, pageSize=None, pageToken=None, readMask=None, x__xgafv=None)</code>
620 <pre>Lists ModelDeploymentMonitoringJobs in a Location.
621
622 Args:
623 parent: string, Required. The parent of the ModelDeploymentMonitoringJob. Format: `projects/{project}/locations/{location}` (required)
624 filter: string, The standard list filter. Supported fields: * `display_name` supports `=`, `!=` comparisons, and `:` wildcard. * `state` supports `=`, `!=` comparisons. * `create_time` supports `=`, `!=`,`&lt;`, `&lt;=`,`&gt;`, `&gt;=` comparisons. `create_time` must be in RFC 3339 format. * `labels` supports general map functions that is: `labels.key=value` - key:value equality `labels.key:* - key existence Some examples of using the filter are: * `state=&quot;JOB_STATE_SUCCEEDED&quot; AND display_name:&quot;my_job_*&quot;` * `state!=&quot;JOB_STATE_FAILED&quot; OR display_name=&quot;my_job&quot;` * `NOT display_name=&quot;my_job&quot;` * `create_time&gt;&quot;2021-05-18T00:00:00Z&quot;` * `labels.keyA=valueA` * `labels.keyB:*`
625 pageSize: integer, The standard list page size.
626 pageToken: string, The standard list page token.
627 readMask: string, Mask specifying which fields to read
628 x__xgafv: string, V1 error format.
629 Allowed values
630 1 - v1 error format
631 2 - v2 error format
632
633 Returns:
634 An object of the form:
635
636 { # Response message for JobService.ListModelDeploymentMonitoringJobs.
637 &quot;modelDeploymentMonitoringJobs&quot;: [ # A list of ModelDeploymentMonitoringJobs that matches the specified filter in the request.
638 { # Represents a job that runs periodically to monitor the deployed models in an endpoint. It will analyze the logged training &amp; prediction data to detect any abnormal behaviors.
639 &quot;analysisInstanceSchemaUri&quot;: &quot;A String&quot;, # YAML schema file uri describing the format of a single instance that you want Tensorflow Data Validation (TFDV) to analyze. If this field is empty, all the feature data types are inferred from predict_instance_schema_uri, meaning that TFDV will use the data in the exact format(data type) as prediction request/response. 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.
640 &quot;bigqueryTables&quot;: [ # Output only. The created bigquery tables for the job under customer project. Customer could do their own query &amp; analysis. There could be 4 log tables in maximum: 1. Training data logging predict request/response 2. Serving data logging predict request/response
641 { # ModelDeploymentMonitoringBigQueryTable specifies the BigQuery table name as well as some information of the logs stored in this table.
642 &quot;bigqueryTablePath&quot;: &quot;A String&quot;, # The created BigQuery table to store logs. Customer could do their own query &amp; analysis. Format: `bq://.model_deployment_monitoring_._`
643 &quot;logSource&quot;: &quot;A String&quot;, # The source of log.
644 &quot;logType&quot;: &quot;A String&quot;, # The type of log.
645 &quot;requestResponseLoggingSchemaVersion&quot;: &quot;A String&quot;, # Output only. The schema version of the request/response logging BigQuery table. Default to v1 if unset.
646 },
647 ],
648 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Timestamp when this ModelDeploymentMonitoringJob was created.
649 &quot;displayName&quot;: &quot;A String&quot;, # Required. The user-defined name of the ModelDeploymentMonitoringJob. The name can be up to 128 characters long and can consist of any UTF-8 characters. Display name of a ModelDeploymentMonitoringJob.
650 &quot;enableMonitoringPipelineLogs&quot;: True or False, # If true, the scheduled monitoring pipeline logs are sent to Google Cloud Logging, including pipeline status and anomalies detected. Please note the logs incur cost, which are subject to [Cloud Logging pricing](https://cloud.google.com/logging#pricing).
651 &quot;encryptionSpec&quot;: { # Represents a customer-managed encryption key specification that can be applied to a Vertex AI resource. # Customer-managed encryption key spec for a ModelDeploymentMonitoringJob. If set, this ModelDeploymentMonitoringJob and all sub-resources of this ModelDeploymentMonitoringJob will be secured by this key.
652 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Required. Resource name of the Cloud KMS key used to protect the resource. The Cloud KMS key must be in the same region as the resource. It must have the format `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
653 },
654 &quot;endpoint&quot;: &quot;A String&quot;, # Required. Endpoint resource name. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
655 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. Only populated when the job&#x27;s state is `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.
656 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
657 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
658 {
659 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
660 },
661 ],
662 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
663 },
664 &quot;labels&quot;: { # The labels with user-defined metadata to organize your ModelDeploymentMonitoringJob. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels.
665 &quot;a_key&quot;: &quot;A String&quot;,
666 },
667 &quot;latestMonitoringPipelineMetadata&quot;: { # All metadata of most recent monitoring pipelines. # Output only. Latest triggered monitoring pipeline metadata.
668 &quot;runTime&quot;: &quot;A String&quot;, # The time that most recent monitoring pipelines that is related to this run.
669 &quot;status&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The status of the most recent monitoring pipeline.
670 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
671 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
672 {
673 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
674 },
675 ],
676 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
677 },
678 },
679 &quot;logTtl&quot;: &quot;A String&quot;, # The TTL of BigQuery tables in user projects which stores logs. A day is the basic unit of the TTL and we take the ceil of TTL/86400(a day). e.g. { second: 3600} indicates ttl = 1 day.
680 &quot;loggingSamplingStrategy&quot;: { # Sampling Strategy for logging, can be for both training and prediction dataset. # Required. Sample Strategy for logging.
681 &quot;randomSampleConfig&quot;: { # Requests are randomly selected. # Random sample config. Will support more sampling strategies later.
682 &quot;sampleRate&quot;: 3.14, # Sample rate (0, 1]
683 },
684 },
685 &quot;modelDeploymentMonitoringObjectiveConfigs&quot;: [ # Required. The config for monitoring objectives. This is a per DeployedModel config. Each DeployedModel needs to be configured separately.
686 { # ModelDeploymentMonitoringObjectiveConfig contains the pair of deployed_model_id to ModelMonitoringObjectiveConfig.
687 &quot;deployedModelId&quot;: &quot;A String&quot;, # The DeployedModel ID of the objective config.
688 &quot;objectiveConfig&quot;: { # The objective configuration for model monitoring, including the information needed to detect anomalies for one particular model. # The objective config of for the modelmonitoring job of this deployed model.
689 &quot;explanationConfig&quot;: { # The config for integrating with Vertex Explainable AI. Only applicable if the Model has explanation_spec populated. # The config for integrating with Vertex Explainable AI.
690 &quot;enableFeatureAttributes&quot;: True or False, # If want to analyze the Vertex Explainable AI feature attribute scores or not. If set to true, Vertex AI will log the feature attributions from explain response and do the skew/drift detection for them.
691 &quot;explanationBaseline&quot;: { # Output from BatchPredictionJob for Model Monitoring baseline dataset, which can be used to generate baseline attribution scores. # Predictions generated by the BatchPredictionJob using baseline dataset.
692 &quot;bigquery&quot;: { # The BigQuery location for the output content. # BigQuery location for BatchExplain output.
693 &quot;outputUri&quot;: &quot;A String&quot;, # Required. BigQuery URI to a project or table, up to 2000 characters long. When only the project is specified, the Dataset and Table is created. When the full table reference is specified, the Dataset must exist and table must not exist. Accepted forms: * BigQuery path. For example: `bq://projectId` or `bq://projectId.bqDatasetId` or `bq://projectId.bqDatasetId.bqTableId`.
694 },
695 &quot;gcs&quot;: { # The Google Cloud Storage location where the output is to be written to. # Cloud Storage location for BatchExplain output.
696 &quot;outputUriPrefix&quot;: &quot;A String&quot;, # Required. Google Cloud Storage URI to output directory. If the uri doesn&#x27;t end with &#x27;/&#x27;, a &#x27;/&#x27; will be automatically appended. The directory is created if it doesn&#x27;t exist.
697 },
698 &quot;predictionFormat&quot;: &quot;A String&quot;, # The storage format of the predictions generated BatchPrediction job.
699 },
700 },
701 &quot;predictionDriftDetectionConfig&quot;: { # The config for Prediction data drift detection. # The config for drift of prediction data.
702 &quot;attributionScoreDriftThresholds&quot;: { # Key is the feature name and value is the threshold. The threshold here is against attribution score distance between different time windows.
703 &quot;a_key&quot;: { # The config for feature monitoring threshold.
704 &quot;value&quot;: 3.14, # Specify a threshold value that can trigger the alert. If this threshold config is for feature distribution distance: 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.
705 },
706 },
707 &quot;defaultDriftThreshold&quot;: { # The config for feature monitoring threshold. # Drift anomaly detection threshold used by all features. When the per-feature thresholds are not set, this field can be used to specify a threshold for all features.
708 &quot;value&quot;: 3.14, # Specify a threshold value that can trigger the alert. If this threshold config is for feature distribution distance: 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.
709 },
710 &quot;driftThresholds&quot;: { # Key is the feature name and value is the threshold. If a feature needs to be monitored for drift, a value threshold must be configured for that feature. The threshold here is against feature distribution distance between different time windws.
711 &quot;a_key&quot;: { # The config for feature monitoring threshold.
712 &quot;value&quot;: 3.14, # Specify a threshold value that can trigger the alert. If this threshold config is for feature distribution distance: 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.
713 },
714 },
715 },
716 &quot;trainingDataset&quot;: { # Training Dataset information. # Training dataset for models. This field has to be set only if TrainingPredictionSkewDetectionConfig is specified.
717 &quot;bigquerySource&quot;: { # The BigQuery location for the input content. # The BigQuery table of the unmanaged Dataset used to train this Model.
718 &quot;inputUri&quot;: &quot;A String&quot;, # Required. BigQuery URI to a table, up to 2000 characters long. Accepted forms: * BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`.
719 },
720 &quot;dataFormat&quot;: &quot;A String&quot;, # Data format of the dataset, only applicable if the input is from Google Cloud Storage. The possible formats are: &quot;tf-record&quot; The source file is a TFRecord file. &quot;csv&quot; The source file is a CSV file. &quot;jsonl&quot; The source file is a JSONL file.
721 &quot;dataset&quot;: &quot;A String&quot;, # The resource name of the Dataset used to train this Model.
722 &quot;gcsSource&quot;: { # The Google Cloud Storage location for the input content. # The Google Cloud Storage uri of the unmanaged Dataset used to train this Model.
723 &quot;uris&quot;: [ # Required. Google Cloud Storage URI(-s) to the input file(s). May contain wildcards. For more information on wildcards, see https://cloud.google.com/storage/docs/wildcards.
724 &quot;A String&quot;,
725 ],
726 },
727 &quot;loggingSamplingStrategy&quot;: { # Sampling Strategy for logging, can be for both training and prediction dataset. # Strategy to sample data from Training Dataset. If not set, we process the whole dataset.
728 &quot;randomSampleConfig&quot;: { # Requests are randomly selected. # Random sample config. Will support more sampling strategies later.
729 &quot;sampleRate&quot;: 3.14, # Sample rate (0, 1]
730 },
731 },
732 &quot;targetField&quot;: &quot;A String&quot;, # The target field name the model is to predict. This field will be excluded when doing Predict and (or) Explain for the training data.
733 },
734 &quot;trainingPredictionSkewDetectionConfig&quot;: { # The config for Training &amp; Prediction data skew detection. It specifies the training dataset sources and the skew detection parameters. # The config for skew between training data and prediction data.
735 &quot;attributionScoreSkewThresholds&quot;: { # Key is the feature name and value is the threshold. The threshold here is against attribution score distance between the training and prediction feature.
736 &quot;a_key&quot;: { # The config for feature monitoring threshold.
737 &quot;value&quot;: 3.14, # Specify a threshold value that can trigger the alert. If this threshold config is for feature distribution distance: 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.
738 },
739 },
740 &quot;defaultSkewThreshold&quot;: { # The config for feature monitoring threshold. # Skew anomaly detection threshold used by all features. When the per-feature thresholds are not set, this field can be used to specify a threshold for all features.
741 &quot;value&quot;: 3.14, # Specify a threshold value that can trigger the alert. If this threshold config is for feature distribution distance: 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.
742 },
743 &quot;skewThresholds&quot;: { # Key is the feature name and value is the threshold. If a feature needs to be monitored for skew, a value threshold must be configured for that feature. The threshold here is against feature distribution distance between the training and prediction feature.
744 &quot;a_key&quot;: { # The config for feature monitoring threshold.
745 &quot;value&quot;: 3.14, # Specify a threshold value that can trigger the alert. If this threshold config is for feature distribution distance: 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.
746 },
747 },
748 },
749 },
750 },
751 ],
752 &quot;modelDeploymentMonitoringScheduleConfig&quot;: { # The config for scheduling monitoring job. # Required. Schedule config for running the monitoring job.
753 &quot;monitorInterval&quot;: &quot;A String&quot;, # Required. The model monitoring job scheduling interval. It will be rounded up to next full hour. This defines how often the monitoring jobs are triggered.
754 &quot;monitorWindow&quot;: &quot;A String&quot;, # The time window of the prediction data being included in each prediction dataset. This window specifies how long the data should be collected from historical model results for each run. If not set, ModelDeploymentMonitoringScheduleConfig.monitor_interval will be used. e.g. If currently the cutoff time is 2022-01-08 14:30:00 and the monitor_window is set to be 3600, then data from 2022-01-08 13:30:00 to 2022-01-08 14:30:00 will be retrieved and aggregated to calculate the monitoring statistics.
755 },
756 &quot;modelMonitoringAlertConfig&quot;: { # The alert config for model monitoring. # Alert config for model monitoring.
757 &quot;emailAlertConfig&quot;: { # The config for email alert. # Email alert config.
758 &quot;userEmails&quot;: [ # The email addresses to send the alert.
759 &quot;A String&quot;,
760 ],
761 },
762 &quot;enableLogging&quot;: True or False, # Dump the anomalies to Cloud Logging. The anomalies will be put to json payload encoded from proto ModelMonitoringStatsAnomalies. This can be further synced to Pub/Sub or any other services supported by Cloud Logging.
763 &quot;notificationChannels&quot;: [ # Resource names of the NotificationChannels to send alert. Must be of the format `projects//notificationChannels/`
764 &quot;A String&quot;,
765 ],
766 },
767 &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of a ModelDeploymentMonitoringJob.
768 &quot;nextScheduleTime&quot;: &quot;A String&quot;, # Output only. Timestamp when this monitoring pipeline will be scheduled to run for the next round.
769 &quot;predictInstanceSchemaUri&quot;: &quot;A String&quot;, # YAML schema file uri describing the format of a single instance, which are given to format this Endpoint&#x27;s prediction (and explanation). If not set, we will generate predict schema from collected predict requests.
770 &quot;samplePredictInstance&quot;: &quot;&quot;, # Sample Predict instance, same format as PredictRequest.instances, this can be set as a replacement of ModelDeploymentMonitoringJob.predict_instance_schema_uri. If not set, we will generate predict schema from collected predict requests.
771 &quot;satisfiesPzi&quot;: True or False, # Output only. Reserved for future use.
772 &quot;satisfiesPzs&quot;: True or False, # Output only. Reserved for future use.
773 &quot;scheduleState&quot;: &quot;A String&quot;, # Output only. Schedule state when the monitoring job is in Running state.
774 &quot;state&quot;: &quot;A String&quot;, # Output only. The detailed state of the monitoring job. When the job is still creating, the state will be &#x27;PENDING&#x27;. Once the job is successfully created, the state will be &#x27;RUNNING&#x27;. Pause the job, the state will be &#x27;PAUSED&#x27;. Resume the job, the state will return to &#x27;RUNNING&#x27;.
775 &quot;statsAnomaliesBaseDirectory&quot;: { # The Google Cloud Storage location where the output is to be written to. # Stats anomalies base folder path.
776 &quot;outputUriPrefix&quot;: &quot;A String&quot;, # Required. Google Cloud Storage URI to output directory. If the uri doesn&#x27;t end with &#x27;/&#x27;, a &#x27;/&#x27; will be automatically appended. The directory is created if it doesn&#x27;t exist.
777 },
778 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Timestamp when this ModelDeploymentMonitoringJob was updated most recently.
779 },
780 ],
781 &quot;nextPageToken&quot;: &quot;A String&quot;, # The standard List next-page token.
782 }</pre>
783 </div>
784
785 <div class="method">
786 <code class="details" id="list_next">list_next()</code>
787 <pre>Retrieves the next page of results.
788
789 Args:
790 previous_request: The request for the previous page. (required)
791 previous_response: The response from the request for the previous page. (required)
792
793 Returns:
794 A request object that you can call &#x27;execute()&#x27; on to request the next
795 page. Returns None if there are no more items in the collection.
796 </pre>
797 </div>
798
799 <div class="method">
800 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
801 <pre>Updates a ModelDeploymentMonitoringJob.
802
803 Args:
804 name: string, Output only. Resource name of a ModelDeploymentMonitoringJob. (required)
805 body: object, The request body.
806 The object takes the form of:
807
808 { # Represents a job that runs periodically to monitor the deployed models in an endpoint. It will analyze the logged training &amp; prediction data to detect any abnormal behaviors.
809 &quot;analysisInstanceSchemaUri&quot;: &quot;A String&quot;, # YAML schema file uri describing the format of a single instance that you want Tensorflow Data Validation (TFDV) to analyze. If this field is empty, all the feature data types are inferred from predict_instance_schema_uri, meaning that TFDV will use the data in the exact format(data type) as prediction request/response. 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.
810 &quot;bigqueryTables&quot;: [ # Output only. The created bigquery tables for the job under customer project. Customer could do their own query &amp; analysis. There could be 4 log tables in maximum: 1. Training data logging predict request/response 2. Serving data logging predict request/response
811 { # ModelDeploymentMonitoringBigQueryTable specifies the BigQuery table name as well as some information of the logs stored in this table.
812 &quot;bigqueryTablePath&quot;: &quot;A String&quot;, # The created BigQuery table to store logs. Customer could do their own query &amp; analysis. Format: `bq://.model_deployment_monitoring_._`
813 &quot;logSource&quot;: &quot;A String&quot;, # The source of log.
814 &quot;logType&quot;: &quot;A String&quot;, # The type of log.
815 &quot;requestResponseLoggingSchemaVersion&quot;: &quot;A String&quot;, # Output only. The schema version of the request/response logging BigQuery table. Default to v1 if unset.
816 },
817 ],
818 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Timestamp when this ModelDeploymentMonitoringJob was created.
819 &quot;displayName&quot;: &quot;A String&quot;, # Required. The user-defined name of the ModelDeploymentMonitoringJob. The name can be up to 128 characters long and can consist of any UTF-8 characters. Display name of a ModelDeploymentMonitoringJob.
820 &quot;enableMonitoringPipelineLogs&quot;: True or False, # If true, the scheduled monitoring pipeline logs are sent to Google Cloud Logging, including pipeline status and anomalies detected. Please note the logs incur cost, which are subject to [Cloud Logging pricing](https://cloud.google.com/logging#pricing).
821 &quot;encryptionSpec&quot;: { # Represents a customer-managed encryption key specification that can be applied to a Vertex AI resource. # Customer-managed encryption key spec for a ModelDeploymentMonitoringJob. If set, this ModelDeploymentMonitoringJob and all sub-resources of this ModelDeploymentMonitoringJob will be secured by this key.
822 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Required. Resource name of the Cloud KMS key used to protect the resource. The Cloud KMS key must be in the same region as the resource. It must have the format `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
823 },
824 &quot;endpoint&quot;: &quot;A String&quot;, # Required. Endpoint resource name. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
825 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. Only populated when the job&#x27;s state is `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.
826 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
827 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
828 {
829 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
830 },
831 ],
832 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
833 },
834 &quot;labels&quot;: { # The labels with user-defined metadata to organize your ModelDeploymentMonitoringJob. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels.
835 &quot;a_key&quot;: &quot;A String&quot;,
836 },
837 &quot;latestMonitoringPipelineMetadata&quot;: { # All metadata of most recent monitoring pipelines. # Output only. Latest triggered monitoring pipeline metadata.
838 &quot;runTime&quot;: &quot;A String&quot;, # The time that most recent monitoring pipelines that is related to this run.
839 &quot;status&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The status of the most recent monitoring pipeline.
840 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
841 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
842 {
843 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
844 },
845 ],
846 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
847 },
848 },
849 &quot;logTtl&quot;: &quot;A String&quot;, # The TTL of BigQuery tables in user projects which stores logs. A day is the basic unit of the TTL and we take the ceil of TTL/86400(a day). e.g. { second: 3600} indicates ttl = 1 day.
850 &quot;loggingSamplingStrategy&quot;: { # Sampling Strategy for logging, can be for both training and prediction dataset. # Required. Sample Strategy for logging.
851 &quot;randomSampleConfig&quot;: { # Requests are randomly selected. # Random sample config. Will support more sampling strategies later.
852 &quot;sampleRate&quot;: 3.14, # Sample rate (0, 1]
853 },
854 },
855 &quot;modelDeploymentMonitoringObjectiveConfigs&quot;: [ # Required. The config for monitoring objectives. This is a per DeployedModel config. Each DeployedModel needs to be configured separately.
856 { # ModelDeploymentMonitoringObjectiveConfig contains the pair of deployed_model_id to ModelMonitoringObjectiveConfig.
857 &quot;deployedModelId&quot;: &quot;A String&quot;, # The DeployedModel ID of the objective config.
858 &quot;objectiveConfig&quot;: { # The objective configuration for model monitoring, including the information needed to detect anomalies for one particular model. # The objective config of for the modelmonitoring job of this deployed model.
859 &quot;explanationConfig&quot;: { # The config for integrating with Vertex Explainable AI. Only applicable if the Model has explanation_spec populated. # The config for integrating with Vertex Explainable AI.
860 &quot;enableFeatureAttributes&quot;: True or False, # If want to analyze the Vertex Explainable AI feature attribute scores or not. If set to true, Vertex AI will log the feature attributions from explain response and do the skew/drift detection for them.
861 &quot;explanationBaseline&quot;: { # Output from BatchPredictionJob for Model Monitoring baseline dataset, which can be used to generate baseline attribution scores. # Predictions generated by the BatchPredictionJob using baseline dataset.
862 &quot;bigquery&quot;: { # The BigQuery location for the output content. # BigQuery location for BatchExplain output.
863 &quot;outputUri&quot;: &quot;A String&quot;, # Required. BigQuery URI to a project or table, up to 2000 characters long. When only the project is specified, the Dataset and Table is created. When the full table reference is specified, the Dataset must exist and table must not exist. Accepted forms: * BigQuery path. For example: `bq://projectId` or `bq://projectId.bqDatasetId` or `bq://projectId.bqDatasetId.bqTableId`.
864 },
865 &quot;gcs&quot;: { # The Google Cloud Storage location where the output is to be written to. # Cloud Storage location for BatchExplain output.
866 &quot;outputUriPrefix&quot;: &quot;A String&quot;, # Required. Google Cloud Storage URI to output directory. If the uri doesn&#x27;t end with &#x27;/&#x27;, a &#x27;/&#x27; will be automatically appended. The directory is created if it doesn&#x27;t exist.
867 },
868 &quot;predictionFormat&quot;: &quot;A String&quot;, # The storage format of the predictions generated BatchPrediction job.
869 },
870 },
871 &quot;predictionDriftDetectionConfig&quot;: { # The config for Prediction data drift detection. # The config for drift of prediction data.
872 &quot;attributionScoreDriftThresholds&quot;: { # Key is the feature name and value is the threshold. The threshold here is against attribution score distance between different time windows.
873 &quot;a_key&quot;: { # The config for feature monitoring threshold.
874 &quot;value&quot;: 3.14, # Specify a threshold value that can trigger the alert. If this threshold config is for feature distribution distance: 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.
875 },
876 },
877 &quot;defaultDriftThreshold&quot;: { # The config for feature monitoring threshold. # Drift anomaly detection threshold used by all features. When the per-feature thresholds are not set, this field can be used to specify a threshold for all features.
878 &quot;value&quot;: 3.14, # Specify a threshold value that can trigger the alert. If this threshold config is for feature distribution distance: 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.
879 },
880 &quot;driftThresholds&quot;: { # Key is the feature name and value is the threshold. If a feature needs to be monitored for drift, a value threshold must be configured for that feature. The threshold here is against feature distribution distance between different time windws.
881 &quot;a_key&quot;: { # The config for feature monitoring threshold.
882 &quot;value&quot;: 3.14, # Specify a threshold value that can trigger the alert. If this threshold config is for feature distribution distance: 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.
883 },
884 },
885 },
886 &quot;trainingDataset&quot;: { # Training Dataset information. # Training dataset for models. This field has to be set only if TrainingPredictionSkewDetectionConfig is specified.
887 &quot;bigquerySource&quot;: { # The BigQuery location for the input content. # The BigQuery table of the unmanaged Dataset used to train this Model.
888 &quot;inputUri&quot;: &quot;A String&quot;, # Required. BigQuery URI to a table, up to 2000 characters long. Accepted forms: * BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`.
889 },
890 &quot;dataFormat&quot;: &quot;A String&quot;, # Data format of the dataset, only applicable if the input is from Google Cloud Storage. The possible formats are: &quot;tf-record&quot; The source file is a TFRecord file. &quot;csv&quot; The source file is a CSV file. &quot;jsonl&quot; The source file is a JSONL file.
891 &quot;dataset&quot;: &quot;A String&quot;, # The resource name of the Dataset used to train this Model.
892 &quot;gcsSource&quot;: { # The Google Cloud Storage location for the input content. # The Google Cloud Storage uri of the unmanaged Dataset used to train this Model.
893 &quot;uris&quot;: [ # Required. Google Cloud Storage URI(-s) to the input file(s). May contain wildcards. For more information on wildcards, see https://cloud.google.com/storage/docs/wildcards.
894 &quot;A String&quot;,
895 ],
896 },
897 &quot;loggingSamplingStrategy&quot;: { # Sampling Strategy for logging, can be for both training and prediction dataset. # Strategy to sample data from Training Dataset. If not set, we process the whole dataset.
898 &quot;randomSampleConfig&quot;: { # Requests are randomly selected. # Random sample config. Will support more sampling strategies later.
899 &quot;sampleRate&quot;: 3.14, # Sample rate (0, 1]
900 },
901 },
902 &quot;targetField&quot;: &quot;A String&quot;, # The target field name the model is to predict. This field will be excluded when doing Predict and (or) Explain for the training data.
903 },
904 &quot;trainingPredictionSkewDetectionConfig&quot;: { # The config for Training &amp; Prediction data skew detection. It specifies the training dataset sources and the skew detection parameters. # The config for skew between training data and prediction data.
905 &quot;attributionScoreSkewThresholds&quot;: { # Key is the feature name and value is the threshold. The threshold here is against attribution score distance between the training and prediction feature.
906 &quot;a_key&quot;: { # The config for feature monitoring threshold.
907 &quot;value&quot;: 3.14, # Specify a threshold value that can trigger the alert. If this threshold config is for feature distribution distance: 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.
908 },
909 },
910 &quot;defaultSkewThreshold&quot;: { # The config for feature monitoring threshold. # Skew anomaly detection threshold used by all features. When the per-feature thresholds are not set, this field can be used to specify a threshold for all features.
911 &quot;value&quot;: 3.14, # Specify a threshold value that can trigger the alert. If this threshold config is for feature distribution distance: 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.
912 },
913 &quot;skewThresholds&quot;: { # Key is the feature name and value is the threshold. If a feature needs to be monitored for skew, a value threshold must be configured for that feature. The threshold here is against feature distribution distance between the training and prediction feature.
914 &quot;a_key&quot;: { # The config for feature monitoring threshold.
915 &quot;value&quot;: 3.14, # Specify a threshold value that can trigger the alert. If this threshold config is for feature distribution distance: 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.
916 },
917 },
918 },
919 },
920 },
921 ],
922 &quot;modelDeploymentMonitoringScheduleConfig&quot;: { # The config for scheduling monitoring job. # Required. Schedule config for running the monitoring job.
923 &quot;monitorInterval&quot;: &quot;A String&quot;, # Required. The model monitoring job scheduling interval. It will be rounded up to next full hour. This defines how often the monitoring jobs are triggered.
924 &quot;monitorWindow&quot;: &quot;A String&quot;, # The time window of the prediction data being included in each prediction dataset. This window specifies how long the data should be collected from historical model results for each run. If not set, ModelDeploymentMonitoringScheduleConfig.monitor_interval will be used. e.g. If currently the cutoff time is 2022-01-08 14:30:00 and the monitor_window is set to be 3600, then data from 2022-01-08 13:30:00 to 2022-01-08 14:30:00 will be retrieved and aggregated to calculate the monitoring statistics.
925 },
926 &quot;modelMonitoringAlertConfig&quot;: { # The alert config for model monitoring. # Alert config for model monitoring.
927 &quot;emailAlertConfig&quot;: { # The config for email alert. # Email alert config.
928 &quot;userEmails&quot;: [ # The email addresses to send the alert.
929 &quot;A String&quot;,
930 ],
931 },
932 &quot;enableLogging&quot;: True or False, # Dump the anomalies to Cloud Logging. The anomalies will be put to json payload encoded from proto ModelMonitoringStatsAnomalies. This can be further synced to Pub/Sub or any other services supported by Cloud Logging.
933 &quot;notificationChannels&quot;: [ # Resource names of the NotificationChannels to send alert. Must be of the format `projects//notificationChannels/`
934 &quot;A String&quot;,
935 ],
936 },
937 &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of a ModelDeploymentMonitoringJob.
938 &quot;nextScheduleTime&quot;: &quot;A String&quot;, # Output only. Timestamp when this monitoring pipeline will be scheduled to run for the next round.
939 &quot;predictInstanceSchemaUri&quot;: &quot;A String&quot;, # YAML schema file uri describing the format of a single instance, which are given to format this Endpoint&#x27;s prediction (and explanation). If not set, we will generate predict schema from collected predict requests.
940 &quot;samplePredictInstance&quot;: &quot;&quot;, # Sample Predict instance, same format as PredictRequest.instances, this can be set as a replacement of ModelDeploymentMonitoringJob.predict_instance_schema_uri. If not set, we will generate predict schema from collected predict requests.
941 &quot;satisfiesPzi&quot;: True or False, # Output only. Reserved for future use.
942 &quot;satisfiesPzs&quot;: True or False, # Output only. Reserved for future use.
943 &quot;scheduleState&quot;: &quot;A String&quot;, # Output only. Schedule state when the monitoring job is in Running state.
944 &quot;state&quot;: &quot;A String&quot;, # Output only. The detailed state of the monitoring job. When the job is still creating, the state will be &#x27;PENDING&#x27;. Once the job is successfully created, the state will be &#x27;RUNNING&#x27;. Pause the job, the state will be &#x27;PAUSED&#x27;. Resume the job, the state will return to &#x27;RUNNING&#x27;.
945 &quot;statsAnomaliesBaseDirectory&quot;: { # The Google Cloud Storage location where the output is to be written to. # Stats anomalies base folder path.
946 &quot;outputUriPrefix&quot;: &quot;A String&quot;, # Required. Google Cloud Storage URI to output directory. If the uri doesn&#x27;t end with &#x27;/&#x27;, a &#x27;/&#x27; will be automatically appended. The directory is created if it doesn&#x27;t exist.
947 },
948 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Timestamp when this ModelDeploymentMonitoringJob was updated most recently.
949 }
950
951 updateMask: string, Required. The update mask is used to specify the fields to be overwritten in the ModelDeploymentMonitoringJob resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then only the non-empty fields present in the request will be overwritten. Set the update_mask to `*` to override all fields. For the objective config, the user can either provide the update mask for model_deployment_monitoring_objective_configs or any combination of its nested fields, such as: model_deployment_monitoring_objective_configs.objective_config.training_dataset. Updatable fields: * `display_name` * `model_deployment_monitoring_schedule_config` * `model_monitoring_alert_config` * `logging_sampling_strategy` * `labels` * `log_ttl` * `enable_monitoring_pipeline_logs` . and * `model_deployment_monitoring_objective_configs` . or * `model_deployment_monitoring_objective_configs.objective_config.training_dataset` * `model_deployment_monitoring_objective_configs.objective_config.training_prediction_skew_detection_config` * `model_deployment_monitoring_objective_configs.objective_config.prediction_drift_detection_config`
952 x__xgafv: string, V1 error format.
953 Allowed values
954 1 - v1 error format
955 2 - v2 error format
956
957 Returns:
958 An object of the form:
959
960 { # This resource represents a long-running operation that is the result of a network API call.
961 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
962 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
963 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
964 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
965 {
966 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
967 },
968 ],
969 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
970 },
971 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
972 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
973 },
974 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
975 &quot;response&quot;: { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
976 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
977 },
978 }</pre>
979 </div>
980
981 <div class="method">
982 <code class="details" id="pause">pause(name, body=None, x__xgafv=None)</code>
983 <pre>Pauses a ModelDeploymentMonitoringJob. If the job is running, the server makes a best effort to cancel the job. Will mark ModelDeploymentMonitoringJob.state to &#x27;PAUSED&#x27;.
984
985 Args:
986 name: string, Required. The resource name of the ModelDeploymentMonitoringJob to pause. Format: `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}` (required)
987 body: object, The request body.
988 The object takes the form of:
989
990 { # Request message for JobService.PauseModelDeploymentMonitoringJob.
991 }
992
993 x__xgafv: string, V1 error format.
994 Allowed values
995 1 - v1 error format
996 2 - v2 error format
997
998 Returns:
999 An object of the form:
1000
1001 { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
1002 }</pre>
1003 </div>
1004
1005 <div class="method">
1006 <code class="details" id="resume">resume(name, body=None, x__xgafv=None)</code>
1007 <pre>Resumes a paused ModelDeploymentMonitoringJob. It will start to run from next scheduled time. A deleted ModelDeploymentMonitoringJob can&#x27;t be resumed.
1008
1009 Args:
1010 name: string, Required. The resource name of the ModelDeploymentMonitoringJob to resume. Format: `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}` (required)
1011 body: object, The request body.
1012 The object takes the form of:
1013
1014 { # Request message for JobService.ResumeModelDeploymentMonitoringJob.
1015 }
1016
1017 x__xgafv: string, V1 error format.
1018 Allowed values
1019 1 - v1 error format
1020 2 - v2 error format
1021
1022 Returns:
1023 An object of the form:
1024
1025 { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
1026 }</pre>
1027 </div>
1028
1029 <div class="method">
1030 <code class="details" id="searchModelDeploymentMonitoringStatsAnomalies">searchModelDeploymentMonitoringStatsAnomalies(modelDeploymentMonitoringJob, body=None, x__xgafv=None)</code>
1031 <pre>Searches Model Monitoring Statistics generated within a given time window.
1032
1033 Args:
1034 modelDeploymentMonitoringJob: string, Required. ModelDeploymentMonitoring Job resource name. Format: `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}` (required)
1035 body: object, The request body.
1036 The object takes the form of:
1037
1038 { # Request message for JobService.SearchModelDeploymentMonitoringStatsAnomalies.
1039 &quot;deployedModelId&quot;: &quot;A String&quot;, # Required. The DeployedModel ID of the [ModelDeploymentMonitoringObjectiveConfig.deployed_model_id].
1040 &quot;endTime&quot;: &quot;A String&quot;, # The latest timestamp of stats being generated. If not set, indicates feching stats till the latest possible one.
1041 &quot;featureDisplayName&quot;: &quot;A String&quot;, # The feature display name. If specified, only return the stats belonging to this feature. Format: ModelMonitoringStatsAnomalies.FeatureHistoricStatsAnomalies.feature_display_name, example: &quot;user_destination&quot;.
1042 &quot;objectives&quot;: [ # Required. Objectives of the stats to retrieve.
1043 { # Stats requested for specific objective.
1044 &quot;topFeatureCount&quot;: 42, # If set, all attribution scores between SearchModelDeploymentMonitoringStatsAnomaliesRequest.start_time and SearchModelDeploymentMonitoringStatsAnomaliesRequest.end_time are fetched, and page token doesn&#x27;t take effect in this case. Only used to retrieve attribution score for the top Features which has the highest attribution score in the latest monitoring run.
1045 &quot;type&quot;: &quot;A String&quot;,
1046 },
1047 ],
1048 &quot;pageSize&quot;: 42, # The standard list page size.
1049 &quot;pageToken&quot;: &quot;A String&quot;, # A page token received from a previous JobService.SearchModelDeploymentMonitoringStatsAnomalies call.
1050 &quot;startTime&quot;: &quot;A String&quot;, # The earliest timestamp of stats being generated. If not set, indicates fetching stats till the earliest possible one.
1051 }
1052
1053 x__xgafv: string, V1 error format.
1054 Allowed values
1055 1 - v1 error format
1056 2 - v2 error format
1057
1058 Returns:
1059 An object of the form:
1060
1061 { # Response message for JobService.SearchModelDeploymentMonitoringStatsAnomalies.
1062 &quot;monitoringStats&quot;: [ # Stats retrieved for requested objectives. There are at most 1000 ModelMonitoringStatsAnomalies.FeatureHistoricStatsAnomalies.prediction_stats in the response.
1063 { # Statistics and anomalies generated by Model Monitoring.
1064 &quot;anomalyCount&quot;: 42, # Number of anomalies within all stats.
1065 &quot;deployedModelId&quot;: &quot;A String&quot;, # Deployed Model ID.
1066 &quot;featureStats&quot;: [ # A list of historical Stats and Anomalies generated for all Features.
1067 { # Historical Stats (and Anomalies) for a specific Feature.
1068 &quot;featureDisplayName&quot;: &quot;A String&quot;, # Display Name of the Feature.
1069 &quot;predictionStats&quot;: [ # A list of historical stats generated by different time window&#x27;s Prediction Dataset.
1070 { # Stats and Anomaly generated at specific timestamp for specific Feature. The start_time and end_time are used to define the time range of the dataset that current stats belongs to, e.g. prediction traffic is bucketed into prediction datasets by time window. If the Dataset is not defined by time window, start_time = end_time. Timestamp of the stats and anomalies always refers to end_time. Raw stats and anomalies are stored in stats_uri or anomaly_uri in the tensorflow defined protos. Field data_stats contains almost identical information with the raw stats in Vertex AI defined proto, for UI to display.
1071 &quot;anomalyDetectionThreshold&quot;: 3.14, # This is the threshold used when detecting anomalies. The threshold can be changed by user, so this one might be different from ThresholdConfig.value.
1072 &quot;anomalyUri&quot;: &quot;A String&quot;, # Path of the anomaly file for current feature values in Cloud Storage bucket. Format: gs:////anomalies. Example: gs://monitoring_bucket/feature_name/anomalies. Stats are stored as binary format with Protobuf message Anoamlies are stored as binary format with Protobuf message [tensorflow.metadata.v0.AnomalyInfo] (https://github.com/tensorflow/metadata/blob/master/tensorflow_metadata/proto/v0/anomalies.proto).
1073 &quot;distributionDeviation&quot;: 3.14, # Deviation from the current stats to baseline stats. 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.
1074 &quot;endTime&quot;: &quot;A String&quot;, # The end timestamp of window where stats were generated. For objectives where time window doesn&#x27;t make sense (e.g. Featurestore Snapshot Monitoring), end_time indicates the timestamp of the data used to generate stats (e.g. timestamp we take snapshots for feature values).
1075 &quot;score&quot;: 3.14, # Feature importance score, only populated when cross-feature monitoring is enabled. For now only used to represent feature attribution score within range [0, 1] for ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_SKEW and ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_DRIFT.
1076 &quot;startTime&quot;: &quot;A String&quot;, # The start timestamp of window where stats were generated. For objectives where time window doesn&#x27;t make sense (e.g. Featurestore Snapshot Monitoring), start_time is only used to indicate the monitoring intervals, so it always equals to (end_time - monitoring_interval).
1077 &quot;statsUri&quot;: &quot;A String&quot;, # Path of the stats file for current feature values in Cloud Storage bucket. Format: gs:////stats. Example: gs://monitoring_bucket/feature_name/stats. Stats are stored as binary format with Protobuf message [tensorflow.metadata.v0.FeatureNameStatistics](https://github.com/tensorflow/metadata/blob/master/tensorflow_metadata/proto/v0/statistics.proto).
1078 },
1079 ],
1080 &quot;threshold&quot;: { # The config for feature monitoring threshold. # Threshold for anomaly detection.
1081 &quot;value&quot;: 3.14, # Specify a threshold value that can trigger the alert. If this threshold config is for feature distribution distance: 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.
1082 },
1083 &quot;trainingStats&quot;: { # Stats and Anomaly generated at specific timestamp for specific Feature. The start_time and end_time are used to define the time range of the dataset that current stats belongs to, e.g. prediction traffic is bucketed into prediction datasets by time window. If the Dataset is not defined by time window, start_time = end_time. Timestamp of the stats and anomalies always refers to end_time. Raw stats and anomalies are stored in stats_uri or anomaly_uri in the tensorflow defined protos. Field data_stats contains almost identical information with the raw stats in Vertex AI defined proto, for UI to display. # Stats calculated for the Training Dataset.
1084 &quot;anomalyDetectionThreshold&quot;: 3.14, # This is the threshold used when detecting anomalies. The threshold can be changed by user, so this one might be different from ThresholdConfig.value.
1085 &quot;anomalyUri&quot;: &quot;A String&quot;, # Path of the anomaly file for current feature values in Cloud Storage bucket. Format: gs:////anomalies. Example: gs://monitoring_bucket/feature_name/anomalies. Stats are stored as binary format with Protobuf message Anoamlies are stored as binary format with Protobuf message [tensorflow.metadata.v0.AnomalyInfo] (https://github.com/tensorflow/metadata/blob/master/tensorflow_metadata/proto/v0/anomalies.proto).
1086 &quot;distributionDeviation&quot;: 3.14, # Deviation from the current stats to baseline stats. 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.
1087 &quot;endTime&quot;: &quot;A String&quot;, # The end timestamp of window where stats were generated. For objectives where time window doesn&#x27;t make sense (e.g. Featurestore Snapshot Monitoring), end_time indicates the timestamp of the data used to generate stats (e.g. timestamp we take snapshots for feature values).
1088 &quot;score&quot;: 3.14, # Feature importance score, only populated when cross-feature monitoring is enabled. For now only used to represent feature attribution score within range [0, 1] for ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_SKEW and ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_DRIFT.
1089 &quot;startTime&quot;: &quot;A String&quot;, # The start timestamp of window where stats were generated. For objectives where time window doesn&#x27;t make sense (e.g. Featurestore Snapshot Monitoring), start_time is only used to indicate the monitoring intervals, so it always equals to (end_time - monitoring_interval).
1090 &quot;statsUri&quot;: &quot;A String&quot;, # Path of the stats file for current feature values in Cloud Storage bucket. Format: gs:////stats. Example: gs://monitoring_bucket/feature_name/stats. Stats are stored as binary format with Protobuf message [tensorflow.metadata.v0.FeatureNameStatistics](https://github.com/tensorflow/metadata/blob/master/tensorflow_metadata/proto/v0/statistics.proto).
1091 },
1092 },
1093 ],
1094 &quot;objective&quot;: &quot;A String&quot;, # Model Monitoring Objective those stats and anomalies belonging to.
1095 },
1096 ],
1097 &quot;nextPageToken&quot;: &quot;A String&quot;, # The page token that can be used by the next JobService.SearchModelDeploymentMonitoringStatsAnomalies call.
1098 }</pre>
1099 </div>
1100
1101 <div class="method">
1102 <code class="details" id="searchModelDeploymentMonitoringStatsAnomalies_next">searchModelDeploymentMonitoringStatsAnomalies_next()</code>
1103 <pre>Retrieves the next page of results.
1104
1105 Args:
1106 previous_request: The request for the previous page. (required)
1107 previous_response: The response from the request for the previous page. (required)
1108
1109 Returns:
1110 A request object that you can call &#x27;execute()&#x27; on to request the next
1111 page. Returns None if there are no more items in the collection.
1112 </pre>
1113 </div>
1114
1115 </body></html>