|
2 | 2 | author: santiagxf
|
3 | 3 | ms.service: machine-learning
|
4 | 4 | ms.topic: include
|
5 |
| -ms.date: 04/22/2023 |
| 5 | +ms.date: 04/02/2024 |
6 | 6 | ms.author: fasantia
|
7 | 7 | ---
|
8 | 8 |
|
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: |
10 | 10 |
|
11 | 11 | * 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. |
14 | 12 |
|
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. |
16 | 14 |
|
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: |
18 | 16 |
|
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/*`. |
20 | 18 |
|
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: |
22 | 22 |
|
23 | 23 | # [Azure CLI](#tab/cli)
|
24 |
| - |
| 24 | + |
| 25 | + [!INCLUDE [cli v2](machine-learning-cli-v2.md)] |
| 26 | + |
25 | 27 | The [Azure CLI](/cli/azure/) and the `ml` [extension for Azure Machine Learning](../how-to-configure-cli.md).
|
26 |
| - |
| 28 | + |
27 | 29 | ```azurecli
|
28 | 30 | az extension add -n ml
|
29 | 31 | ```
|
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) |
48 | 32 |
|
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) |
67 | 34 |
|
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)] |
70 | 36 |
|
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). |
72 | 38 |
|
73 | 39 | ```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 |
79 | 41 | ```
|
80 | 42 |
|
81 |
| -# [Studio](#tab/studio) |
| 43 | + # [Studio](#tab/azure-studio) |
82 | 44 |
|
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. |
0 commit comments