Skip to content

Commit 3eebb9e

Browse files
authored
Merge pull request #269548 from msakande/freshness-batch-endpoints-how-to
freshness review for how-to-deploy-batch
2 parents 538d102 + 640860d commit 3eebb9e

19 files changed

+367
-351
lines changed

articles/machine-learning/how-to-use-batch-model-deployments.md

Lines changed: 338 additions & 282 deletions
Large diffs are not rendered by default.

articles/machine-learning/includes/azureml-batch-clone-samples-with-studio.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
author: santiagxf
33
ms.service: machine-learning
44
ms.topic: include
5-
ms.date: 04/22/2023
5+
ms.date: 04/02/2024
66
ms.author: fasantia
77
---
88

@@ -12,24 +12,24 @@ The example in this article is based on code samples contained in the [azureml-e
1212

1313
```azurecli
1414
git clone https://github.com/Azure/azureml-examples --depth 1
15-
cd azureml-examples/cli
15+
cd azureml-examples/cli/endpoints/batch/deploy-models/mnist-classifier
1616
```
1717

1818
# [Python](#tab/python)
1919

2020
```azurecli
2121
!git clone https://github.com/Azure/azureml-examples --depth 1
22-
!cd azureml-examples/sdk/python
22+
!cd azureml-examples/sdk/python/endpoints/batch/deploy-models/mnist-classifier
2323
```
2424

25-
# [Studio](#tab/studio)
25+
To follow along with this example in a Jupyter Notebook, in the cloned repository, open the notebook: [mnist-batch.ipynb](https://github.com/Azure/azureml-examples/blob/main/sdk/python/endpoints/batch/deploy-models/mnist-classifier/mnist-batch.ipynb).
2626

27-
1. On the left navigation bar, select the option __Notebooks__.
28-
29-
1. Then, clic on __Samples__.
27+
# [Studio](#tab/azure-studio)
3028

31-
1. Navigate to the folder __SDK v2/sdk/python/endpoints/batch__.
32-
33-
1. Select the notebook you want to try out and click on __Clone this notebook__.
29+
1. On the left navigation bar, select the option __Notebooks__.
30+
1. Select __Samples__.
31+
1. Navigate to the folder _SDK v2/sdk/python/endpoints/batch/deploy-models/mnist-classifier_.
32+
1. Select the notebook __mnist-batch.ipynb__.
33+
1. Select __Clone this notebook__.
3434

3535
---

articles/machine-learning/includes/azureml-batch-clone-samples.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
author: santiagxf
33
ms.service: machine-learning
44
ms.topic: include
5-
ms.date: 04/22/2023
5+
ms.date: 04/02/2024
66
ms.author: fasantia
77
---
88

articles/machine-learning/includes/azureml-batch-prereqs-with-studio.md

Lines changed: 18 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -2,84 +2,44 @@
22
author: santiagxf
33
ms.service: machine-learning
44
ms.topic: include
5-
ms.date: 04/22/2023
5+
ms.date: 04/02/2024
66
ms.author: fasantia
77
---
88

9-
Before following the steps in this article, make sure you have the following prerequisites:
9+
Before you follow the steps in this article, make sure you have the following prerequisites:
1010

1111
* An Azure subscription. If you don't have an Azure subscription, create a free account before you begin. Try the [free or paid version of Azure Machine Learning](https://azure.microsoft.com/free/).
12-
13-
* An Azure Machine Learning workspace. If you don't have one, use the steps in the [How to manage workspaces](../how-to-manage-workspace.md) to create one.
1412

15-
* Ensure you have the following permissions in the workspace:
13+
* An Azure Machine Learning workspace. If you don't have one, use the steps in the [How to manage workspaces](../how-to-manage-workspace.md) article to create one.
1614

17-
* Create/manage batch endpoints and deployments: Use roles Owner, contributor, or custom role allowing `Microsoft.MachineLearningServices/workspaces/batchEndpoints/*`.
15+
* To perform the following tasks, ensure that you have these permissions in the workspace:
1816

19-
* Create ARM deployments in the workspace resource group: Use roles Owner, contributor, or custom role allowing `Microsoft.Resources/deployments/write` in the resource group where the workspace is deployed.
17+
* To create/manage batch endpoints and deployments: Use owner role, contributor role, or a custom role allowing `Microsoft.MachineLearningServices/workspaces/batchEndpoints/*`.
2018

21-
* You will need to install the following software to work with Azure Machine Learning:
19+
* To create ARM deployments in the workspace resource group: Use owner role, contributor role, or a custom role allowing `Microsoft.Resources/deployments/write` in the resource group where the workspace is deployed.
20+
21+
* You need to install the following software to work with Azure Machine Learning:
2222

2323
# [Azure CLI](#tab/cli)
24-
24+
25+
[!INCLUDE [cli v2](machine-learning-cli-v2.md)]
26+
2527
The [Azure CLI](/cli/azure/) and the `ml` [extension for Azure Machine Learning](../how-to-configure-cli.md).
26-
28+
2729
```azurecli
2830
az extension add -n ml
2931
```
30-
31-
# [Python](#tab/python)
32-
33-
Install the [Azure Machine Learning SDK for Python](https://aka.ms/sdk-v2-install).
34-
35-
```python
36-
pip install azure-ai-ml
37-
```
38-
39-
# [Studio](#tab/studio)
40-
41-
There are no further requirements if you plan to use Azure Machine Learning studio.
42-
43-
### Connect to your workspace
44-
45-
First, let's connect to Azure Machine Learning workspace where we're going to work on.
46-
47-
# [Azure CLI](#tab/cli)
4832
49-
```azurecli
50-
az account set --subscription <subscription>
51-
az configure --defaults workspace=<workspace> group=<resource-group> location=<location>
52-
```
53-
54-
# [Python](#tab/python)
55-
56-
The workspace is the top-level resource for Azure Machine Learning, providing a centralized place to work with all the artifacts you create when you use Azure Machine Learning. In this section, we'll connect to the workspace in which you'll perform deployment tasks.
57-
58-
1. Import the required libraries:
59-
60-
```python
61-
from azure.ai.ml import MLClient, Input, load_component
62-
from azure.ai.ml.entities import BatchEndpoint, ModelBatchDeployment, ModelBatchDeploymentSettings, PipelineComponentBatchDeployment, Model, AmlCompute, Data, BatchRetrySettings, CodeConfiguration, Environment, Data
63-
from azure.ai.ml.constants import AssetTypes, BatchDeploymentOutputAction
64-
from azure.ai.ml.dsl import pipeline
65-
from azure.identity import DefaultAzureCredential
66-
```
33+
# [Python](#tab/python)
6734
68-
> [!NOTE]
69-
> Classes `ModelBatchDeployment` and `PipelineComponentBatchDeployment` were introduced in version 1.7.0 of the SDK.
35+
[!INCLUDE [sdk v2](machine-learning-sdk-v2.md)]
7036
71-
2. Configure workspace details and get a handle to the workspace:
37+
Install the [Azure Machine Learning SDK for Python](https://aka.ms/sdk-v2-install).
7238
7339
```python
74-
subscription_id = "<subscription>"
75-
resource_group = "<resource-group>"
76-
workspace = "<workspace>"
77-
78-
ml_client = MLClient(DefaultAzureCredential(), subscription_id, resource_group, workspace)
40+
pip install azure-ai-ml
7941
```
8042
81-
# [Studio](#tab/studio)
43+
# [Studio](#tab/azure-studio)
8244
83-
Open the [Azure Machine Learning studio portal](https://ml.azure.com) and sign in using your credentials.
84-
85-
---
45+
There are no further requirements if you plan to use Azure Machine Learning studio.
Binary file not shown.

0 commit comments

Comments
 (0)