Skip to content

Commit 229cbc6

Browse files
committed
acrolinx
1 parent 68fd628 commit 229cbc6

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

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

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ ms.custom: devx-track-azurecli
1010
ms.author: truptiparkar
1111
author: truptiparkar7
1212
ms.reviewer: larryfr
13-
ms.date: 03/20/2024
13+
ms.date: 03/26/2024
1414
monikerRange: 'azureml-api-2 || azureml-api-1'
1515
---
1616

1717
# Trigger applications, processes, or CI/CD workflows based on Azure Machine Learning events
1818

19-
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).
19+
In this article, you learn how to set up event-driven applications, processes, or CI/CD workflows based on Azure Machine Learning events. For example, failure notification emails or ML pipeline runs, when certain conditions are detected using [Azure Event Grid](../event-grid/index.yml).
2020

2121
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.
2222

@@ -54,16 +54,16 @@ Azure Machine Learning provides events in the various points of machine learning
5454

5555
### Filter & subscribe to events
5656

57-
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).
57+
These events are published through Azure Event Grid. From the Azure portal, PowerShell, or Azure CLI, you can easily subscribe to events by [specifying one or more event types, and filtering conditions](../event-grid/event-filtering.md).
5858

59-
When setting up your events, you can apply filters to only trigger on specific event data. In the following example, for run status changed events, you can filter by run types. The event only triggers when the criteria are 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.
59+
When setting up your events, you can apply filters to only trigger on specific event data. In the following example, for run status changed events, you can filter by run types. The event only triggers when the criteria are met. For more information on the event data you can filter on, see the [Azure Machine Learning Event Grid schema](../event-grid/event-schema-machine-learning.md).
6060

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

6363

6464
1. Go to the Azure portal, select a new subscription or an existing one.
6565
1. Select the Events entry from the left navigation area, and then select **+ Event subscription**.
66-
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.
66+
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 triggers when the run type is a pipeline run or pipeline step run.
6767

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

@@ -80,9 +80,7 @@ Subscriptions for Azure Machine Learning events are protected by Azure role-base
8080
| `Microsoft.MachineLearningServices.DatasetDriftDetected` (preview) | `datadrift/{data.DataDriftId}/run/{data.RunId}` | `datadrift/4e694bf5-712e-4e40-b06a-d2a2755212d4/run/my_driftrun1_1550564444_fbbcdc0f` |
8181
| `Microsoft.MachineLearningServices.RunStatusChanged` | `experiments/{ExperimentId}/runs/{RunId}` | `experiments/b1d7966c-f73a-4c68-b846-992ace89551f/runs/my_exp1_1554835758_38dbaa94` |
8282

83-
+ **Advanced filtering**: Azure Event Grid also supports advanced filtering based on published event schema. Azure Machine Learning event schema details can be found in [Azure Event Grid event schema for Azure Machine Learning](../event-grid/event-schema-machine-learning.md). Some sample advanced filterings you can perform include:
84-
85-
For `Microsoft.MachineLearningServices.ModelRegistered` event, to filter model's tag value:
83+
+ **Advanced filtering**: Azure Event Grid also supports advanced filtering based on published event schema. Azure Machine Learning event schema details can be found in [Azure Event Grid event schema for Azure Machine Learning](../event-grid/event-schema-machine-learning.md). For `Microsoft.MachineLearningServices.ModelRegistered` event, to filter model's tag value:
8684

8785
```
8886
--advanced-filter data.ModelTags.key1 StringIn ('value1')
@@ -101,7 +99,7 @@ Applications that handle Machine Learning events should follow a few recommended
10199
> * Ignore fields you don't understand. This practice will help keep you resilient to new features that might be added in the future.
102100
> * Failed or cancelled Azure Machine Learning operations will not trigger an event. For example, if a model deployment fails Microsoft.MachineLearningServices.ModelDeployed won't be triggered. Consider such failure mode when design your applications. You can always use Azure Machine Learning SDK, CLI or portal to check the status of an operation and understand the detailed failure reasons.
103101
104-
Azure Event Grid allows customers to build de-coupled message handlers, which can be triggered by Azure Machine Learning events. Some notable examples of message handlers are:
102+
Azure Event Grid allows customers to build decoupled message handlers, which can be triggered by Azure Machine Learning events. Some notable examples of message handlers are:
105103
* Azure Functions
106104
* Azure Logic Apps
107105
* Azure Event Hubs
@@ -116,15 +114,15 @@ Azure Event Grid allows customers to build de-coupled message handlers, which ca
116114

117115
:::image type="content" source="./media/how-to-use-event-grid/select-event.png" alt-text="Screenshot showing the Event Subscription selection.":::
118116

119-
1. Select the event type to consume. For example, the following screenshot has selected __Model registered__, __Model deployed__, __Run completed__, and __Dataset drift detected__:
117+
1. Select the event type to consume.
120118

121119
:::image type="content" source="./media/how-to-use-event-grid/add-event-type-updated.png" alt-text="Screenshot of the Create Event Subscription form.":::
122120

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

125123
![Screenshot shows the Create Event Subscription pane with Select Event Hub open.](./media/how-to-use-event-grid/select-event-handler.png)
126124

127-
Once you have confirmed your selection, select __Create__. After configuration, these events will be pushed to your endpoint.
125+
Once you confirm your selection, select __Create__. After configuration, these events will be pushed to your endpoint.
128126

129127

130128
### Set up with the CLI
@@ -208,7 +206,7 @@ In this example, a simple Data Factory pipeline is used to copy files into a blo
208206

209207
![Screenshot shows the Logic App Create pane.](./media/how-to-use-event-grid/set-up-logic-app-for-adf.png)
210208

211-
1. Once you have created the logic app, select __When an Event Grid resource event occurs__.
209+
1. Once you create the logic app, select __When an Event Grid resource event occurs__.
212210

213211
![Screenshot shows the Logic Apps Designer with Start with a common trigger options, including When an Event Grid resource event occurs.](./media/how-to-use-event-grid/select-event-grid-trigger.png)
214212

0 commit comments

Comments
 (0)