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
[Azure Event Grid](https://docs.microsoft.com/azure/event-grid/) supports Azure Machine Learning events. For example, you can use events from run completion, model registration, model deployment, and data drift detection scoped to a workspace.
18
+
[Azure Event Grid](https://docs.microsoft.com/azure/event-grid/) supports Azure Machine Learning events. You can subscribe and consume events such as run status changed, run completion, model registration, model deployment, and data drift detection within a workspace.
19
19
20
-
For more information, see [Azure Machine Learning integration with Event Grid](concept-event-grid-integration.md) and the [Azure Machine Learning event grid schema](/azure/event-grid/event-schema-machine-learning).
20
+
For more information on event types, see [Azure Machine Learning integration with Event Grid](concept-event-grid-integration.md) and the [Azure Machine Learning event grid schema](/azure/event-grid/event-schema-machine-learning).
21
21
22
22
Use Event Grid to enable common scenarios such as:
23
23
24
-
* Send emails on run completion
24
+
* Send emails on run failure and run completion
25
25
* Use an azure function after a model is registered
26
26
* Streaming events from Azure Machine Learning to various of endpoints
27
27
* Trigger an ML pipeline when drift is detected
28
28
29
+
> [!NOTE]
30
+
> Currently, runStatusChanged events only trigger when the run status is **failed**
31
+
>
32
+
29
33
## Prerequisites
30
34
* Contributor or owner access to the Azure Machine Learning workspace you will create events for.
31
35
@@ -39,14 +43,15 @@ Use Event Grid to enable common scenarios such as:
39
43
40
44
1. Select the event type to consume. For example, the following screenshot has selected __Model registered__, __Model deployed__, __Run completed__, and __Dataset drift detected__:
Once you have confirmed your selection, click __Create__. After configuration, these events will be pushed to your endpoint.
49
53
54
+
50
55
### Configure EventGrid using the CLI
51
56
52
57
You can either install the latest [Azure CLI](https://docs.microsoft.com/cli/azure/install-azure-cli?view=azure-cli-latest), or use the Azure Cloud Shell that is provided as part of your Azure subscription.
@@ -72,13 +77,17 @@ az eventgrid event-subscription create \
72
77
--subject-begins-with "models/mymodelname"
73
78
```
74
79
75
-
## Sample scenarios
80
+
## Filter Events
76
81
77
-
### Use Azure Functions to deploy a model based on tags
82
+
When setting up your events, you can apply filters to only trigger on specific event data. In the example below, for run status changed events, you can filter by run types. The event only triggers when the criteria is met. Refer to the [Azure Machine Learning event grid schema](/azure/event-grid/event-schema-machine-learning)to learn about event data you can filter by.
78
83
79
-
An Azure Machine Learning model object contains parameters you can pivot deployments on such as model name, version, tag, and property. The model registration event can trigger an endpoint and you can use an Azure Function to deploy a model based on the value of those parameters.
84
+
1. Go to the Azure portal, select a new subscription or an existing one.
80
85
81
-
For an example, see the [https://github.com/Azure-Samples/MachineLearningSamples-NoCodeDeploymentTriggeredByEventGrid](https://github.com/Azure-Samples/MachineLearningSamples-NoCodeDeploymentTriggeredByEventGrid) repository and follow the steps in the **readme** file.
86
+
1. Select the filters tab and scroll down to Advanced filters. In the **Key** and **Value** provide the property types you want to filter by. Here you can see the event will only trigger when the run type is a pipeline run or pipeline step run.
1. You can also add filters to only trigger the logic app on a subset of event types. In the following screenshot, a __prefix filter__ of __/datadriftID/runs/__ is used.
108
+
1. You can use the filtering method in the section above or add filters to only trigger the logic app on a subset of event types. In the following screenshot, a __prefix filter__ of __/datadriftID/runs/__ is used.
### Use Azure Functions to deploy a model based on tags
173
+
174
+
An Azure Machine Learning model object contains parameters you can pivot deployments on such as model name, version, tag, and property. The model registration event can trigger an endpoint and you can use an Azure Function to deploy a model based on the value of those parameters.
175
+
176
+
For an example, see the [https://github.com/Azure-Samples/MachineLearningSamples-NoCodeDeploymentTriggeredByEventGrid](https://github.com/Azure-Samples/MachineLearningSamples-NoCodeDeploymentTriggeredByEventGrid) repository and follow the steps in the **readme** file.
0 commit comments