Skip to content

Commit b116297

Browse files
authored
Add clear statement to handle enable/disable signal alerts
1 parent 70337bc commit b116297

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

articles/machine-learning/how-to-monitor-model-performance.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ To enable feature importance with any of your signals (such as data drift or dat
207207

208208
After enabling feature importance, you'll see a feature importance for each feature you're monitoring in the Azure Machine Learning model monitoring studio UI.
209209

210-
You can use Azure CLI, the Python SDK, or the studio for advanced setup of model monitoring.
210+
You can use Azure CLI, the Python SDK, or the studio for advanced setup of model monitoring. You can enable/disable alerts for each signal by setting alert_enabled property while using SDK or CLI.
211211

212212
# [Azure CLI](#tab/azure-cli)
213213

@@ -316,7 +316,8 @@ metric_thresholds = DataDriftMetricThreshold(
316316
advanced_data_drift = DataDriftSignal(
317317
reference_data=reference_data_training,
318318
features=features,
319-
metric_thresholds=metric_thresholds
319+
metric_thresholds=metric_thresholds,
320+
alert_enabled=True
320321
)
321322

322323
# create an advanced prediction drift signal
@@ -328,7 +329,8 @@ metric_thresholds = PredictionDriftMetricThreshold(
328329

329330
advanced_prediction_drift = PredictionDriftSignal(
330331
reference_data=reference_data_training,
331-
metric_thresholds=metric_thresholds
332+
metric_thresholds=metric_thresholds,
333+
alert_enabled=True
332334
)
333335

334336
# create an advanced data quality signal
@@ -347,7 +349,7 @@ advanced_data_quality = DataQualitySignal(
347349
reference_data=reference_data_training,
348350
features=features,
349351
metric_thresholds=metric_thresholds,
350-
alert_enabled=False
352+
alert_enabled=True
351353
)
352354

353355
# create feature attribution drift signal
@@ -356,7 +358,7 @@ metric_thresholds = FeatureAttributionDriftMetricThreshold(normalized_discounted
356358
feature_attribution_drift = FeatureAttributionDriftSignal(
357359
reference_data=reference_data_training,
358360
metric_thresholds=metric_thresholds,
359-
alert_enabled=False
361+
alert_enabled=True
360362
)
361363

362364
# put all monitoring signals in a dictionary
@@ -648,7 +650,8 @@ metric_thresholds = ModelPerformanceMetricThreshold(
648650
model_performance = ModelPerformanceSignal(
649651
production_data=production_data,
650652
reference_data=reference_data_ground_truth,
651-
metric_thresholds=metric_thresholds
653+
metric_thresholds=metric_thresholds,
654+
alert_enabled=True
652655
)
653656

654657
# put all monitoring signals in a dictionary
@@ -844,7 +847,8 @@ advanced_data_drift = DataDriftSignal(
844847
production_data=production_data,
845848
reference_data=reference_data_training,
846849
features=features,
847-
metric_thresholds=metric_thresholds
850+
metric_thresholds=metric_thresholds,
851+
alert_enabled=True
848852
)
849853

850854

@@ -864,7 +868,7 @@ advanced_data_quality = DataQualitySignal(
864868
reference_data=reference_data_training,
865869
features=features,
866870
metric_thresholds=metric_thresholds,
867-
alert_enabled="False"
871+
alert_enabled=True
868872
)
869873

870874
# put all monitoring signals in a dictionary

0 commit comments

Comments
 (0)