你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
MonitoringTarget Class
Monitoring target.
Constructor
MonitoringTarget(*, ml_task: str | MonitorTargetTasks | None = None, endpoint_deployment_id: str | None = None, model_id: str | None = None)
Keyword-Only Parameters
Name | Description |
---|---|
ml_task
|
Type of task. Allowed values: Classification, Regression, and QuestionAnswering |
endpoint_deployment_id
|
The ARM ID of the target deployment. Mutually exclusive with model_id. |
model_id
|
ARM ID of the target model ID. Mutually exclusive with endpoint_deployment_id. |
Examples
Setting a monitoring target using endpoint_deployment_id.
from azure.ai.ml.entities import (
AlertNotification,
MonitorDefinition,
MonitoringTarget,
SparkResourceConfiguration,
)
monitor_definition = MonitorDefinition(
compute=SparkResourceConfiguration(instance_type="standard_e4s_v3", runtime_version="3.4"),
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"]),
)