Skip to content

Commit 1a8dda4

Browse files
authored
Update how-to-use-event-grid.md
1 parent 381222e commit 1a8dda4

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

articles/machine-learning/how-to-use-event-grid.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ ms.topic: how-to
99
ms.custom: devx-track-azurecli
1010
ms.author: larryfr
1111
author: Blackmist
12-
ms.date: 10/21/2021
12+
ms.date: 06/21/2022
1313
---
1414

1515
# Trigger applications, processes, or CI/CD workflows based on Azure Machine Learning events (preview)
1616

1717
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).
1818

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.
2020

2121
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
2323
* Use an Azure function after a model is registered
2424
* Streaming events from Azure Machine Learning to various of endpoints
2525
* Trigger an ML pipeline when drift is detected
@@ -41,24 +41,24 @@ Azure Machine Learning provides events in the various points of machine learning
4141

4242
| Event type | Description |
4343
| ---------- | ----------- |
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 |
4545
| `Microsoft.MachineLearningServices.ModelRegistered` | Raised when a machine learning model is registered in the workspace |
4646
| `Microsoft.MachineLearningServices.ModelDeployed` | Raised when a deployment of inference service with one or more models is completed |
4747
| `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 |
4949

5050
### Filter & subscribe to events
5151

5252
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).
5353

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.
5555

5656
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.
5757

5858

5959
1. Go to the Azure portal, select a new subscription or an existing one.
6060

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.
6262

6363
:::image type="content" source="media/how-to-use-event-grid/select-event-filters.png" alt-text="filter events":::
6464

@@ -109,11 +109,11 @@ Azure Event Grid allows customers to build de-coupled message handlers, which ca
109109

110110
1. From the left bar, select __Events__ and then select **Event Subscriptions**.
111111

112-
![select-events-in-workspace.png](./media/how-to-use-event-grid/select-event.png)
112+
:::image type="content" source="./media/how-to-use-event-grid/select-event.png" alt-text="Screenshot showing the Event Subscription selection.":::
113113

114114
1. Select the event type to consume. For example, the following screenshot has selected __Model registered__, __Model deployed__, __Run completed__, and __Dataset drift detected__:
115115

116-
![add-event-type](./media/how-to-use-event-grid/add-event-type-updated.png)
116+
:::image type="content" source="./media/how-to-use-event-grid/add-event-type-updated.png" alt-text="Screenshot of the Create Event Subscription form.":::
117117

118118
1. Select the endpoint to publish the event to. In the following screenshot, __Event hub__ is the selected endpoint:
119119

@@ -155,21 +155,21 @@ Use [Azure Logic Apps](../logic-apps/index.yml) to configure emails for all your
155155

156156
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__.
157157

158-
![Screenshot shows a Machine Learning workspace Events page with Logic Apps.](./media/how-to-use-event-grid/select-logic-ap.png)
158+
:::image type="content" source="./media/how-to-use-event-grid/select-logic-ap.png" alt-text="Screenshot showing the Logic Apps selection.":::
159159

160160
1. Sign into the Logic App UI and select Machine Learning service as the topic type.
161161

162162
![Screenshot shows the When a resource event occurs dialog box with machine learning selected as a resource type.](./media/how-to-use-event-grid/select-topic-type.png)
163163

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__.
165165

166-
![Screenshot shows the When a resource event occurs dialog box with an event type selected.](./media/how-to-use-event-grid/select-event-runcomplete.png)
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.":::
167167

168168
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.
169169

170170
![Screenshot shows the Choose an action dialog box with email entered in the search line.](./media/how-to-use-event-grid/select-email-action.png)
171171

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.
173173

174174
![Screenshot shows the Send an email dialog box with Topic and Event Type added to the subject line from the list to the right.](./media/how-to-use-event-grid/configure-email-body.png)
175175

@@ -191,7 +191,7 @@ Before you begin, perform the following actions:
191191

192192
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)
193193

194-
![Screenshot shows the Training Pipeline in Factory Resources with Copy data1 feeding M L Execute Pipeline1.](./media/how-to-use-event-grid/adf-mlpipeline-stage.png)
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.":::
195195

196196
1. Start with creating the logic app. Go to the [Azure portal](https://portal.azure.com), search for Logic Apps, and select create.
197197

@@ -207,23 +207,23 @@ In this example, a simple Data Factory pipeline is used to copy files into a blo
207207

208208
1. Login and fill in the details for the event. Set the __Resource Name__ to the workspace name. Set the __Event Type__ to __DatasetDriftDetected__.
209209

210-
![Screenshot shows the When a resource event occurs with an Event Type Item selected.](./media/how-to-use-event-grid/login-and-add-event.png)
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.":::
211211

212212
1. Add a new step, and search for __Azure Data Factory__. Select __Create a pipeline run__.
213213

214-
![Screenshot shows the Choose an action pane with Create a pipeline job selected.](./media/how-to-use-event-grid/create-adfpipeline-run.png)
214+
![Screenshot shows the Choose an action pane with Create a pipeline run selected.](./media/how-to-use-event-grid/create-adfpipeline-run.png)
215215

216216
1. Login and specify the published Azure Data Factory pipeline to run.
217217

218-
![Screenshot shows the Create a pipeline job pane with various values.](./media/how-to-use-event-grid/specify-adf-pipeline.png)
218+
![Screenshot shows the Create a pipeline run pane with various values.](./media/how-to-use-event-grid/specify-adf-pipeline.png)
219219

220220
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**.
221221

222222
![Screenshot shows events with the Logic App highlighted.](./media/how-to-use-event-grid/show-logic-app-webhook.png)
223223

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).
225225

226-
![Screenshot shows pipeline endpoints.](./media/how-to-use-event-grid/view-in-workspace.png)
226+
:::image type="content" source="./media/how-to-use-event-grid/view-in-workspace.png" alt-text="Screenshot showing pipeline endpoints.":::
227227

228228
### Example: Deploy a model based on tags
229229

0 commit comments

Comments
 (0)