Skip to content

Commit 4e9c11f

Browse files
authored
Merge pull request #187480 from sdgilley/sdg-v1v2
Adding v1/v2 information for CLI code
2 parents 4540d62 + 396eb20 commit 4e9c11f

File tree

66 files changed

+260
-30
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+260
-30
lines changed

articles/machine-learning/azure-machine-learning-release-notes-cli-v2.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ ms.date: 11/03/2021
1313

1414
# Azure Machine Learning CLI (v2) release notes
1515

16+
[!INCLUDE [cli v2](../../includes/machine-learning-cli-v2.md)]
17+
18+
1619
In this article, learn about Azure Machine Learning CLI (v2) releases.
1720

1821
__RSS feed__: Get notified when this page is updated by copying and pasting the following URL into your feed reader:

articles/machine-learning/concept-component.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,8 @@ model = f"This is a dummy model with id: {str(uuid4())} generated at: {curtime}\
159159

160160
### Create a component using CLI (v2)
161161

162+
[!INCLUDE [cli v2](../../includes/machine-learning-cli-v2.md)]
163+
162164
After you define your component specification and Python script files, and [install CLI (v2) successfully](how-to-configure-cli.md) successfully, you can create the component in your workspaces using:
163165

164166
```azurecli

articles/machine-learning/concept-train-model-git-integration.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ run.properties['azureml.git.commit']
184184
```
185185
186186
### Azure CLI
187+
[!INCLUDE [cli v1](../../includes/machine-learning-cli-v1.md)]
187188
188189
The `az ml run` CLI command can be used to retrieve the properties from a run. For example, the following command returns the properties for the last run in the experiment named `train-on-amlcompute`:
189190

articles/machine-learning/how-to-access-resources-from-endpoints-managed-identities.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ ms.custom: devplatv2
1717

1818
# Access Azure resources from an online endpoint (preview) with a managed identity
1919

20+
[!INCLUDE [cli v2](../../includes/machine-learning-cli-v2.md)]
21+
2022
Learn how to access Azure resources from your scoring script with an online endpoint and either a system-assigned managed identity or a user-assigned managed identity.
2123

2224
Managed endpoints (preview) allow Azure Machine Learning to manage the burden of provisioning your compute resource and deploying your machine learning model. Typically your model needs to access Azure resources such as the Azure Container Registry or your blob storage for inferencing; with a managed identity you can access these resources without needing to manage credentials in your code. [Learn more about managed identities](../active-directory/managed-identities-azure-resources/overview.md).
@@ -29,7 +31,7 @@ This guide assumes you don't have a managed identity, a storage account or an on
2931

3032
* To use Azure Machine Learning, you must have 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/) today.
3133

32-
* Install and configure the Azure CLI and ML extension. For more information, see [Install, set up, and use the 2.0 CLI (preview)](how-to-configure-cli.md).
34+
* Install and configure the Azure CLI and ML (v2) extension. For more information, see [Install, set up, and use the 2.0 CLI (preview)](how-to-configure-cli.md).
3335

3436
* An Azure Resource group, in which you (or the service principal you use) need to have `User Access Administrator` and `Contributor` access. You'll have such a resource group if you configured your ML extension per the above article.
3537

articles/machine-learning/how-to-change-storage-access-key.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ms.date: 10/21/2021
1515
---
1616

1717
# Regenerate storage account access keys
18-
18+
[!INCLUDE [cli v1](../../includes/machine-learning-cli-v1.md)]
1919

2020
Learn how to change the access keys for Azure Storage accounts used by Azure Machine Learning. Azure Machine Learning can use storage accounts to store data or trained models.
2121

@@ -30,7 +30,7 @@ For security purposes, you may need to change the access keys for an Azure Stora
3030

3131
* The [Azure Machine Learning SDK](/python/api/overview/azure/ml/install).
3232

33-
* The [Azure Machine Learning CLI extension](reference-azure-machine-learning-cli.md).
33+
* The [Azure Machine Learning CLI extension v1](reference-azure-machine-learning-cli.md).
3434

3535
> [!NOTE]
3636
> The code snippets in this document were tested with version 1.0.83 of the Python SDK.

articles/machine-learning/how-to-configure-cli.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ ms.custom: devx-track-azurecli, devplatv2
1616

1717
# Install and set up the CLI (v2)
1818

19+
[!INCLUDE [cli v2](../../includes/machine-learning-cli-v2.md)]
20+
1921
The `ml` extension (preview) to the [Azure CLI](/cli/azure/) is the enhanced interface for Azure Machine Learning. It enables you to train and deploy models from the command line, with features that accelerate scaling data science up and out while tracking the model lifecycle.
2022

2123
[!INCLUDE [preview disclaimer](../../includes/machine-learning-preview-generic-disclaimer.md)]

articles/machine-learning/how-to-consume-web-service.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ There are a several ways to retrieve this information for deployed web services:
7676

7777
# [Azure CLI](#tab/azure-cli)
7878

79+
[!INCLUDE [cli v1](../../includes/machine-learning-cli-v1.md)]
80+
7981
If you know the name of the deployed service, use the [az ml service show](/cli/azure/ml(v1)/service#az_ml_service_show) command:
8082

8183
```azurecli
@@ -158,6 +160,8 @@ print(token)
158160

159161
If you have the [Azure CLI and the machine learning extension](reference-azure-machine-learning-cli.md), you can use the following command to get a token:
160162

163+
[!INCLUDE [cli v1](../../includes/machine-learning-cli-v1.md)]
164+
161165
```azurecli
162166
az ml service get-access-token -n <service-name>
163167
```

articles/machine-learning/how-to-create-attach-compute-cluster.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ Compute clusters can run jobs securely in a [virtual network environment](how-to
6363
> [!TIP]
6464
> Clusters can generally scale up to 100 nodes as long as you have enough quota for the number of cores required. By default clusters are setup with inter-node communication enabled between the nodes of the cluster to support MPI jobs for example. However you can scale your clusters to 1000s of nodes by simply [raising a support ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/newsupportrequest), and requesting to allow list your subscription, or workspace, or a specific cluster for disabling inter-node communication.
6565

66-
6766
## Create
6867

6968
**Time estimate**: Approximately 5 minutes.
@@ -93,6 +92,7 @@ You can also configure several advanced properties when you create Azure Machine
9392

9493
# [Azure CLI](#tab/azure-cli)
9594

95+
[!INCLUDE [cli v1](../../includes/machine-learning-cli-v1.md)]
9696

9797
```azurecli-interactive
9898
az ml computetarget create amlcompute -n cpu --min-nodes 1 --max-nodes 1 -s STANDARD_D3_V2 --location westus2
@@ -125,6 +125,8 @@ compute_config = AmlCompute.provisioning_configuration(vm_size='STANDARD_D2_V2',
125125

126126
# [Azure CLI](#tab/azure-cli)
127127

128+
[!INCLUDE [cli v1](../../includes/machine-learning-cli-v1.md)]
129+
128130
Set the `vm-priority`:
129131

130132
```azurecli-interactive
@@ -188,6 +190,9 @@ In the studio, choose **Low Priority** when you create a VM.
188190

189191
# [Azure CLI](#tab/azure-cli)
190192

193+
[!INCLUDE [cli v1](../../includes/machine-learning-cli-v1.md)]
194+
195+
191196
* Create a new managed compute cluster with managed identity
192197

193198
* User-assigned managed identity

articles/machine-learning/how-to-create-attach-kubernetes.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ For more information on the classes, methods, and parameters used in this exampl
193193

194194
# [Azure CLI](#tab/azure-cli)
195195

196+
[!INCLUDE [cli v1](../../includes/machine-learning-cli-v1.md)]
197+
196198
```azurecli
197199
az ml computetarget create aks -n myaks
198200
```
@@ -256,6 +258,8 @@ For more information on the classes, methods, and parameters used in this exampl
256258

257259
# [Azure CLI](#tab/azure-cli)
258260

261+
[!INCLUDE [cli v1](../../includes/machine-learning-cli-v1.md)]
262+
259263
To attach an existing cluster using the CLI, you need to get the resource ID of the existing cluster. To get this value, use the following command. Replace `myexistingcluster` with the name of your AKS cluster. Replace `myresourcegroup` with the resource group that contains the cluster:
260264

261265
```azurecli
@@ -369,6 +373,8 @@ aks_target.detach()
369373

370374
# [Azure CLI](#tab/azure-cli)
371375

376+
[!INCLUDE [cli v1](../../includes/machine-learning-cli-v1.md)]
377+
372378
To detach the existing cluster to your workspace, use the following command. Replace `myaks` with the name that the AKS cluster is attached to your workspace as. Replace `myresourcegroup` with the resource group that contains your workspace. Replace `myworkspace` with your workspace name.
373379

374380
```azurecli
@@ -437,6 +443,8 @@ kubectl get secret/azuremlfessl -o yaml
437443

438444
Many webservice failures in AKS can be debugged by connecting to the cluster using `kubectl`. You can get the `kubeconfig.json` for an AKS cluster by running
439445

446+
[!INCLUDE [cli v1](../../includes/machine-learning-cli-v1.md)]
447+
440448
```azurecli-interactive
441449
az aks get-credentials -g <rg> -n <aks cluster name>
442450
```

articles/machine-learning/how-to-create-component-pipelines-cli.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ ms.devlang: azurecli
1616

1717
# Create and run machine learning pipelines using components with the Azure Machine Learning CLI (Preview)
1818

19+
[!INCLUDE [cli v2](../../includes/machine-learning-cli-v2.md)]
20+
1921
In this article, you learn how to create and run [machine learning pipelines](concept-ml-pipelines.md) by using the Azure CLI and Components (for more, see [What is an Azure Machine Learning component?](concept-component.md)). You can [create pipelines without using components](how-to-train-cli.md#build-a-training-pipeline), but components offer the greatest amount of flexibility and reuse. AzureML Pipelines may be defined in YAML and run from the CLI, authored in Python, or composed in AzureML Studio Designer with a drag-and-drop UI. This document focuses on the CLI.
2022

2123
[!INCLUDE [preview disclaimer](../../includes/machine-learning-preview-generic-disclaimer.md)]

0 commit comments

Comments
 (0)