You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/machine-learning/concept-model-monitoring.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,8 +49,11 @@ Azure Machine Learning model monitoring (preview) supports the following list of
49
49
| Data drift | Data drift tracks changes in the distribution of a model's input data by comparing it to the model's training data or recent past production data. | Jensen-Shannon Distance, Population Stability Index, Normalized Wasserstein Distance, Two-Sample Kolmogorov-Smirnov Test, Pearson's Chi-Squared Test | Classification (tabular data), Regression (tabular data) | Production data - model inputs | Recent past production data or training data |
50
50
| Prediction drift | Prediction drift tracks changes in the distribution of a model's prediction outputs by comparing it to validation or test labeled data or recent past production data. | Jensen-Shannon Distance, Population Stability Index, Normalized Wasserstein Distance, Chebyshev Distance, Two-Sample Kolmogorov-Smirnov Test, Pearson's Chi-Squared Test | Classification (tabular data), Regression (tabular data) | Production data - model outputs | Recent past production data or validation data |
51
51
| Data quality | Data quality tracks the data integrity of a model's input by comparing it to the model's training data or recent past production data. The data quality checks include checking for null values, type mismatch, or out-of-bounds of values. | Null value rate, data type error rate, out-of-bounds rate | Classification (tabular data), Regression (tabular data) | production data - model inputs | Recent past production data or training data |
52
-
| Feature attribution drift | Feature attribution drift tracks the importance or contributions of features to prediction outputs in production by comparing it to feature importance at training time | Normalized discounted cumulative gain | Classification (tabular data), Regression (tabular data) | Production data | Training data |
52
+
| Feature attribution drift | Feature attribution drift tracks the importance or contributions of features to prediction outputs in production by comparing it to feature importance at training time | Normalized discounted cumulative gain | Classification (tabular data), Regression (tabular data) | Production data - model inputs & outputs (*see the following note*) | Training data (required)|
53
53
54
+
> [!NOTE]
55
+
> For 'feature attribution drift' signal (during Preview), the user must create a custom data asset of type 'uri_folder' that contains joined inputs and outputs (Model Data Collector can be leveraged). Additionally, 'target_column_name' is also a required field, which specifies the prediction column in your training dataset.
56
+
54
57
## How model monitoring works in Azure Machine Learning
55
58
56
59
Azure Machine Learning acquires monitoring signals by performing statistical computations on production inference data and reference data. This reference data can include the model's training data or validation data, while the production inference data refers to the model's input and output data collected in production.
@@ -84,4 +87,4 @@ Each machine learning model and its use cases are unique. Therefore, model monit
84
87
85
88
-[Perform continuous model monitoring in Azure Machine Learning](how-to-monitor-model-performance.md)
86
89
-[Model data collection](concept-data-collection.md)
87
-
-[Collect production inference data](how-to-collect-production-data.md)
90
+
-[Collect production inference data](how-to-collect-production-data.md)
By default, Azure Machine Learning raises an exception if there's a failure during data collection. Optionally, you can use the `on_error` parameter to specify a function to run if logging failure happens. For instance, using the `on_error` parameter in the following code, Azure Machine Learning logs the error rather than throwing an exception:
@@ -106,6 +107,7 @@ def init():
106
107
# instantiate collectors with appropriate names, make sure align with deployment spec
Copy file name to clipboardExpand all lines: articles/machine-learning/how-to-monitor-model-performance.md
+23-16Lines changed: 23 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,7 @@ Before following the steps in this article, make sure you have the following pre
66
66
>
67
67
> Model monitoring jobs are scheduled to run on serverless Spark compute pool with `Standard_E4s_v3` VM instance type support only. More VM instance type support will come in the future roadmap.
68
68
69
-
## Set up out-of-box model monitoring
69
+
## Set up out-of-the-box model monitoring
70
70
71
71
If you deploy your model to production in an Azure Machine Learning online endpoint, Azure Machine Learning collects production inference data automatically and uses it for continuous monitoring.
72
72
@@ -79,6 +79,9 @@ You can use Azure CLI, the Python SDK, or Azure Machine Learning studio for out-
79
79
* smart defaults for metrics and thresholds.
80
80
* A monitoring job is scheduled to run daily at 3:15am (for this example) to acquire monitoring signals and evaluate each metric result against its corresponding threshold. By default, when any threshold is exceeded, an alert email is sent to the user who set up the monitoring.
81
81
82
+
## Configure feature importance
83
+
84
+
For feature importance to be enabled with any of your signals (such as data drift or data quality,) you need to provide both the 'baseline_dataset' (typically training) dataset and 'target_column_name' fields.
82
85
83
86
# [Azure CLI](#tab/azure-cli)
84
87
@@ -88,7 +91,7 @@ Azure Machine Learning model monitoring uses `az ml schedule` for model monitori
88
91
az ml schedule create -f ./out-of-box-monitoring.yaml
89
92
```
90
93
91
-
The following YAML contains the definition for out-of-box model monitoring.
94
+
The following YAML contains the definition for out-of-the-box model monitoring.
92
95
93
96
```yaml
94
97
# out-of-box-monitoring.yaml
@@ -117,7 +120,7 @@ create_monitor:
117
120
118
121
# [Python](#tab/python)
119
122
120
-
You can use the following code to set up out-of-box model monitoring:
123
+
You can use the following code to set up out-of-the-box model monitoring:
121
124
122
125
```python
123
126
@@ -269,18 +272,18 @@ create_monitor:
269
272
dataset:
270
273
input_dataset:
271
274
path: azureml:my_model_production_data:1
272
-
type: mltable
273
-
dataset_context: model_inputs
275
+
type: uri_folder
276
+
dataset_context: model_inputs_outputs
274
277
baseline_dataset:
275
278
input_dataset:
276
279
path: azureml:my_model_training_data:1
277
280
type: mltable
278
-
dataset_context: model_inputs
281
+
dataset_context: training
279
282
target_column_name: fraud_detected
280
283
model_type: classification
281
284
# if no metric_thresholds defined, use the default metric_thresholds
1. Complete the entires on the basic settings page as described in the [Set up out-of-box model monitoring](#set-up-out-of-box-model-monitoring) section.
453
+
1. Complete the entires on the basic settings page as described in the [Set up out-of-box model monitoring](#set-up-out-of-the-box-model-monitoring) section.
451
454
1. Select **More options** to open the advanced setup wizard.
452
455
453
456
1. In the "Configure dataset" section, add a dataset to be used as the comparison baseline. We recommend using the model training data as the comparison baseline for data drift and data quality, and using the model validation data as the comparison baseline for prediction drift.
1. In the "Add Signal" screen, select the **Feature Attribution Drift** panel.
474
-
1. Enter a name for Feature Attribution Drift signal.
477
+
1. Enter a name for Feature Attribution Drift signal. Feature attribution drift currently requires a few additional steps:
478
+
1. Configure your data assets for Feature Attribution Drift
479
+
1. In your model creation wizard, add your custom data asset from your [custom data collection](how-to-collect-production-data.md) called 'model inputs and outputs' which combines your joined model inputs and data assets as a separate data context.
480
+
481
+
:::image type="content" source="media/how-to-monitor-models/feature-attribution-drift-inputs-outputs.png" alt-text="Screenshot showing how to configure a custom data asset with inputs and outputs joined." lightbox="media/how-to-monitor-models/feature-attribution-drift-inputs-outputs.png":::
482
+
483
+
1. Specify your training reference dataset that will be used in the feature attribution drift component, and select your 'target column name' field, which is required to enable feature importance.
484
+
1. Confirm your parameters are correct
475
485
1. Adjust the data window size according to your business case.
476
-
1. Select the training data as the baseline dataset.
477
-
1. Select the target column name.
478
486
1. Adjust the threshold according to your need.
479
487
1. Select **Save** to return to the "Select monitoring signals" section.
480
488
1. If you're done with editing or adding signals, select **Next**.
481
489
482
490
:::image type="content" source="media/how-to-monitor-models/model-monitoring-advanced-config-add-signal.png" alt-text="Screenshot showing settings for adding signals." lightbox="media/how-to-monitor-models/model-monitoring-advanced-config-add-signal.png":::
483
491
484
492
1. In the "Notification" screen, enable alert notification for each signal.
485
-
1. (Optional) Enable "Azure Monitor" for all metrics to be sent to Azure Monitor.
486
493
1. Select **Next**.
487
494
488
495
:::image type="content" source="media/how-to-monitor-models/model-monitoring-advanced-config-notification.png" alt-text="Screenshot of settings on the notification screen." lightbox="media/how-to-monitor-models/model-monitoring-advanced-config-notification.png":::
0 commit comments