MonitorDefinition Class
Monitor definition
- Inheritance
-
azure.ai.ml.entities._mixins.RestTranslatableMixinMonitorDefinition
Constructor
MonitorDefinition(*, compute: ServerlessSparkCompute, monitoring_target: MonitoringTarget | None = None, monitoring_signals: Dict[str, DataDriftSignal | DataQualitySignal | PredictionDriftSignal | FeatureAttributionDriftSignal | CustomMonitoringSignal | GenerationSafetyQualitySignal | GenerationTokenStatisticsSignal] = None, alert_notification: Literal['azmonitoring'] | AlertNotification | None = None)
Keyword-Only Parameters
Name | Description |
---|---|
compute
|
The Spark resource configuration to be associated with the monitor |
monitoring_target
|
The ARM ID object associated with the model or deployment that is being monitored. |
monitoring_signals
|
Optional[Dict[str, Union[DataDriftSignal , DataQualitySignal, PredictionDriftSignal , FeatureAttributionDriftSignal , CustomMonitoringSignal , GenerationSafetyQualitySignal , GenerationTokenStatisticsSignal , ModelPerformanceSignal]]]
The dictionary of signals to monitor. The key is the name of the signal and the value is the DataSignal object. Accepted values for the DataSignal objects are DataDriftSignal, DataQualitySignal, PredictionDriftSignal, FeatureAttributionDriftSignal, and CustomMonitoringSignal. |
alert_notification
|
The alert configuration for the monitor. |
Examples
Creating Monitor definition.
from azure.ai.ml.entities import (
AlertNotification,
MonitorDefinition,
MonitoringTarget,
SparkResourceConfiguration,
)
monitor_definition = MonitorDefinition(
compute=SparkResourceConfiguration(instance_type="standard_e4s_v3", runtime_version="3.3"),
monitoring_target=MonitoringTarget(
ml_task="Classification",
endpoint_deployment_id="azureml:fraud_detection_endpoint:fraud_detection_deployment",
),
alert_notification=AlertNotification(emails=["abc@example.com", "def@example.com"]),
)
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Azure SDK for Python