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/how-to-use-event-grid.md
+19-19Lines changed: 19 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,17 +9,17 @@ ms.topic: how-to
9
9
ms.custom: devx-track-azurecli
10
10
ms.author: larryfr
11
11
author: Blackmist
12
-
ms.date: 10/21/2021
12
+
ms.date: 06/21/2022
13
13
---
14
14
15
15
# Trigger applications, processes, or CI/CD workflows based on Azure Machine Learning events (preview)
16
16
17
17
In this article, you learn how to set up event-driven applications, processes, or CI/CD workflows based on Azure Machine Learning events, such as failure notification emails or ML pipeline runs, when certain conditions are detected by [Azure Event Grid](../event-grid/index.yml).
18
18
19
-
Azure Machine Learning manages the entire lifecycle of machine learning process, including model training, model deployment, and monitoring. You can use Event Grid to react to Azure Machine Learning events, such as the completion of training jobs, the registration and deployment of models, and the detection of data drift, by using modern serverless architectures. You can then subscribe and consume events such as job status changed, job completion, model registration, model deployment, and data drift detection within a workspace.
19
+
Azure Machine Learning manages the entire lifecycle of machine learning process, including model training, model deployment, and monitoring. You can use Event Grid to react to Azure Machine Learning events, such as the completion of training runs, the registration and deployment of models, and the detection of data drift, by using modern serverless architectures. You can then subscribe and consume events such as run status changed, run completion, model registration, model deployment, and data drift detection within a workspace.
20
20
21
21
When to use Event Grid for event driven actions:
22
-
* Send emails on job failure and job completion
22
+
* Send emails on run failure and run completion
23
23
* Use an Azure function after a model is registered
24
24
* Streaming events from Azure Machine Learning to various of endpoints
25
25
* Trigger an ML pipeline when drift is detected
@@ -41,24 +41,24 @@ Azure Machine Learning provides events in the various points of machine learning
41
41
42
42
| Event type | Description |
43
43
| ---------- | ----------- |
44
-
|`Microsoft.MachineLearningServices.RunCompleted`| Raised when a machine learning experiment job is completed |
44
+
|`Microsoft.MachineLearningServices.RunCompleted`| Raised when a machine learning experiment run is completed |
45
45
|`Microsoft.MachineLearningServices.ModelRegistered`| Raised when a machine learning model is registered in the workspace |
46
46
|`Microsoft.MachineLearningServices.ModelDeployed`| Raised when a deployment of inference service with one or more models is completed |
47
47
|`Microsoft.MachineLearningServices.DatasetDriftDetected`| Raised when a data drift detection job for two datasets is completed |
48
-
|`Microsoft.MachineLearningServices.RunStatusChanged`| Raised when a job status is changed |
48
+
|`Microsoft.MachineLearningServices.RunStatusChanged`| Raised when a run status is changed |
49
49
50
50
### Filter & subscribe to events
51
51
52
52
These events are published through Azure Event Grid. Using Azure portal, PowerShell or Azure CLI, customers can easily subscribe to events by [specifying one or more event types, and filtering conditions](../event-grid/event-filtering.md).
53
53
54
-
When setting up your events, you can apply filters to only trigger on specific event data. In the example below, for job status changed events, you can filter by job types. The event only triggers when the criteria is met. Refer to the [Azure Machine Learning event grid schema](../event-grid/event-schema-machine-learning.md) to learn about event data you can filter by.
54
+
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](../event-grid/event-schema-machine-learning.md) to learn about event data you can filter by.
55
55
56
56
Subscriptions for Azure Machine Learning events are protected by Azure role-based access control (Azure RBAC). Only [contributor or owner](how-to-assign-roles.md#default-roles) of a workspace can create, update, and delete event subscriptions. Filters can be applied to event subscriptions either during the [creation](/cli/azure/eventgrid/event-subscription) of the event subscription or at a later time.
57
57
58
58
59
59
1. Go to the Azure portal, select a new subscription or an existing one.
60
60
61
-
1. Select the filters tab and scroll down to Advanced filters. For the **Key** and **Value**, provide the property types you want to filter by. Here you can see the event will only trigger when the job type is a pipeline job or pipeline step job.
61
+
1. Select the filters tab and scroll down to Advanced filters. For 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.
:::image type="content" source="./media/how-to-use-event-grid/select-event.png" alt-text="Screenshot showing the Event Subscription selection.":::
113
113
114
114
1. Select the event type to consume. For example, the following screenshot has selected __Model registered__, __Model deployed__, __Run completed__, and __Dataset drift detected__:
:::image type="content" source="./media/how-to-use-event-grid/add-event-type-updated.png" alt-text="Screenshot of the Create Event Subscription form.":::
117
117
118
118
1. Select the endpoint to publish the event to. In the following screenshot, __Event hub__ is the selected endpoint:
119
119
@@ -155,21 +155,21 @@ Use [Azure Logic Apps](../logic-apps/index.yml) to configure emails for all your
155
155
156
156
1. In the Azure portal, go to your Azure Machine Learning workspace and select the events tab from the left bar. From here, select __Logic apps__.
157
157
158
-

158
+
:::image type="content" source="./media/how-to-use-event-grid/select-logic-ap.png" alt-text="Screenshot showing the Logic Apps selection.":::
159
159
160
160
1. Sign into the Logic App UI and select Machine Learning service as the topic type.
161
161
162
162

163
163
164
-
1. Select which event(s) to be notified for. For example, the following screenshot __JobCompleted__.
164
+
1. Select which event(s) to be notified for. For example, the following screenshot __RunCompleted__.
165
165
166
-

166
+
:::image type="content" source="./media/how-to-use-event-grid/select-event-runcomplete.png" alt-text="Screenshot showing the Machine Learning service as the resource type.":::
167
167
168
168
1. Next, add a step to consume this event and search for email. There are several different mail accounts you can use to receive events. You can also configure conditions on when to send an email alert.
169
169
170
170

171
171
172
-
1. Select __Send an email__ and fill in the parameters. In the subject, you can include the __Event Type__ and __Topic__ to help filter events. You can also include a link to the workspace page for jobs in the message body.
172
+
1. Select __Send an email__ and fill in the parameters. In the subject, you can include the __Event Type__ and __Topic__ to help filter events. You can also include a link to the workspace page for runs in the message body.
173
173
174
174

175
175
@@ -191,7 +191,7 @@ Before you begin, perform the following actions:
191
191
192
192
In this example, a simple Data Factory pipeline is used to copy files into a blob store and run a published Machine Learning pipeline. For more information on this scenario, see how to set up a [Machine Learning step in Azure Data Factory](../data-factory/transform-data-machine-learning-service.md)
193
193
194
-

194
+
:::image type="content" source="./media/how-to-use-event-grid/adf-mlpipeline-stage.png" alt-text="Screenshot showing the training pipeline in Azure Data Factory.":::
195
195
196
196
1. Start with creating the logic app. Go to the [Azure portal](https://portal.azure.com), search for Logic Apps, and select create.
197
197
@@ -207,23 +207,23 @@ In this example, a simple Data Factory pipeline is used to copy files into a blo
207
207
208
208
1. Login and fill in the details for the event. Set the __Resource Name__ to the workspace name. Set the __Event Type__ to __DatasetDriftDetected__.
209
209
210
-

210
+
:::image type="content" source="./media/how-to-use-event-grid/login-and-add-event.png" alt-text="Screenshot showing the data drift event type item.":::
211
211
212
212
1. Add a new step, and search for __Azure Data Factory__. Select __Create a pipeline run__.
213
213
214
-

214
+

215
215
216
216
1. Login and specify the published Azure Data Factory pipeline to run.
217
217
218
-

218
+

219
219
220
220
1. Save and create the logic app using the **save** button on the top left of the page. To view your app, go to your workspace in the [Azure portal](https://portal.azure.com) and click on **Events**.
221
221
222
222

223
223
224
-
Now the data factory pipeline is triggered when drift occurs. View details on your data drift run and machine learning pipeline on the [new workspace portal](https://ml.azure.com).
224
+
Now the data factory pipeline is triggered when drift occurs. View details on your data drift run and machine learning pipeline in [Azure Machine Learning studio](https://ml.azure.com).
0 commit comments