Skip to content

Commit fdd75e2

Browse files
Merge pull request #272014 from Blackmist/232478-uuf
feedback from customers
2 parents bbcbc15 + d9dad8b commit fdd75e2

File tree

2 files changed

+18
-13
lines changed

2 files changed

+18
-13
lines changed

articles/machine-learning/how-to-manage-environments-v2.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.topic: how-to
88
author: ositanachi
99
ms.author: osiotugo
1010
ms.reviewer: larryfr
11-
ms.date: 01/03/2024
11+
ms.date: 04/19/2024
1212
ms.custom: devx-track-azurecli, devplatv2, devx-track-python
1313
---
1414

@@ -44,11 +44,11 @@ Note that `--depth 1` clones only the latest commit to the repository, which red
4444
### Connect to the workspace
4545

4646
> [!TIP]
47-
> Use the tabs below to select the method you want to use to work with environments. Selecting a tab will automatically switch all the tabs in this article to the same tab. You can select another tab at any time.
47+
> Use the following tabs to select the method you want to use to work with environments. Selecting a tab will automatically switch all the tabs in this article to the same tab. You can select another tab at any time.
4848
4949
# [Azure CLI](#tab/cli)
5050

51-
When using the Azure CLI, you need identifier parameters - a subscription, resource group, and workspace name. While you can specify these parameters for each command, you can also set defaults that will be used for all the commands. Use the following commands to set default values. Replace `<subscription ID>`, `<Azure Machine Learning workspace name>`, and `<resource group>` with the values for your configuration:
51+
When using the Azure CLI, you need identifier parameters - a subscription, resource group, and workspace name. While you can specify these parameters for each command, you can also set defaults that are used for all the commands. Use the following commands to set default values. Replace `<subscription ID>`, `<Azure Machine Learning workspace name>`, and `<resource group>` with the values for your configuration:
5252

5353
```azurecli
5454
az account set --subscription <subscription ID>
@@ -57,7 +57,7 @@ az configure --defaults workspace=<Azure Machine Learning workspace name> group=
5757

5858
# [Python SDK](#tab/python)
5959

60-
To connect to the workspace, you need identifier parameters - a subscription, resource group, and workspace name. You'll use these details in the `MLClient` from the `azure.ai.ml` namespace to get a handle to the required Azure Machine Learning workspace. To authenticate, you use the [default Azure authentication](/python/api/azure-identity/azure.identity.defaultazurecredential?view=azure-python&preserve-view=true). Check this [example](https://github.com/Azure/azureml-examples/blob/main/sdk/python/jobs/configuration.ipynb) for more details on how to configure credentials and connect to a workspace.
60+
To connect to the workspace, you need identifier parameters - a subscription, resource group, and workspace name. You use these details in the `MLClient` from the `azure.ai.ml` namespace to get a handle to the required Azure Machine Learning workspace. To authenticate, you use the [default Azure authentication](/python/api/azure-identity/azure.identity.defaultazurecredential?view=azure-python&preserve-view=true). Check this [example](https://github.com/Azure/azureml-examples/blob/main/sdk/python/jobs/configuration.ipynb) for more details on how to configure credentials and connect to a workspace.
6161

6262
[!notebook-python[] (~/azureml-examples-main/sdk/python/assets/environment/environment.ipynb?name=libraries)]
6363

@@ -77,6 +77,9 @@ You can use these curated environments out of the box for training or deployment
7777

7878
You can see the set of available curated environments in the Azure Machine Learning studio UI, or by using the CLI (v2) via `az ml environment list`.
7979

80+
> [!TIP]
81+
> When working with curated environments in the CLI or SDK, the environment name begins with `AzureML-` followed by the name of the curated environment. When using the Azure Machine Learning studio, they do not have this prefix. The reason for this difference is that the studio UI displays curated and custom environments on separate tabs, so the prefix isn't necessary. The CLI and SDK do not have this separation, so the prefix is used to differentiate between curated and custom environments.
82+
8083
## Create a custom environment
8184

8285
You can define an environment from a Docker image, a Docker build context, and a conda specification with Docker image.
@@ -112,11 +115,11 @@ The following example creates an environment from a Docker image. An image from
112115
113116
### Create an environment from a Docker build context
114117

115-
Instead of defining an environment from a prebuilt image, you can also define one from a Docker [build context](https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#understand-build-context). To do so, specify the directory that will serve as the build context. This directory should contain a Dockerfile (not larger than 1MB) and any other files needed to build the image.
118+
Instead of defining an environment from a prebuilt image, you can also define one from a Docker [build context](https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#understand-build-context). To do so, specify the directory that serves as the build context. This directory should contain a Dockerfile (not larger than 1MB) and any other files needed to build the image.
116119

117120
# [Azure CLI](#tab/cli)
118121

119-
The following example is a YAML specification file for an environment defined from a build context. The local path to the build context folder is specified in the `build.path` field, and the relative path to the Dockerfile within that build context folder is specified in the `build.dockerfile_path` field. If `build.dockerfile_path` is omitted in the YAML file, Azure Machine Learning will look for a Dockerfile named `Dockerfile` at the root of the build context.
122+
The following example is a YAML specification file for an environment defined from a build context. The local path to the build context folder is specified in the `build.path` field, and the relative path to the Dockerfile within that build context folder is specified in the `build.dockerfile_path` field. If `build.dockerfile_path` is omitted in the YAML file, Azure Machine Learning looks for a Dockerfile named `Dockerfile` at the root of the build context.
120123

121124
In this example, the build context contains a Dockerfile named `Dockerfile` and a `requirements.txt` file that is referenced within the Dockerfile for installing Python packages.
122125

@@ -130,19 +133,19 @@ az ml environment create --file assets/environment/docker-context.yml
130133

131134
# [Python SDK](#tab/python)
132135

133-
In the following example, the local path to the build context folder is specified in the `path` parameter. Azure Machine Learning will look for a Dockerfile named `Dockerfile` at the root of the build context.
136+
In the following example, the local path to the build context folder is specified in the `path` parameter. Azure Machine Learning looks for a Dockerfile named `Dockerfile` at the root of the build context.
134137

135138
[!notebook-python[] (~/azureml-examples-main/sdk/python/assets/environment/environment.ipynb?name=create_from_docker_context)]
136139

137140
---
138141

139-
Azure Machine Learning will start building the image from the build context when the environment is created. You can monitor the status of the build and view the build logs in the studio UI.
142+
Azure Machine Learning starts building the image from the build context when the environment is created. You can monitor the status of the build and view the build logs in the studio UI.
140143

141144
### Create an environment from a conda specification
142145

143146
You can define an environment using a standard conda YAML configuration file that includes the dependencies for the conda environment. See [Creating an environment manually](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-file-manually) for information on this standard format.
144147

145-
You must also specify a base Docker image for this environment. Azure Machine Learning will build the conda environment on top of the Docker image provided. If you install some Python dependencies in your Docker image, those packages won't exist in the execution environment thus causing runtime failures. By default, Azure Machine Learning will build a Conda environment with dependencies you specified, and will execute the job in that environment instead of using any Python libraries that you installed on the base image.
148+
You must also specify a base Docker image for this environment. Azure Machine Learning builds the conda environment on top of the Docker image provided. If you install some Python dependencies in your Docker image, those packages won't exist in the execution environment thus causing runtime failures. By default, Azure Machine Learning builds a Conda environment with dependencies you specified, and runs the job in that environment instead of using any Python libraries that you installed on the base image.
146149

147150
## [Azure CLI](#tab/cli)
148151

@@ -164,7 +167,7 @@ The relative path to the conda file is specified using the `conda_file` paramete
164167

165168
---
166169

167-
Azure Machine Learning will build the final Docker image from this environment specification when the environment is used in a job or deployment. You can also manually trigger a build of the environment in the studio UI.
170+
Azure Machine Learning builds the final Docker image from this environment specification when the environment is used in a job or deployment. You can also manually trigger a build of the environment in the studio UI.
168171

169172
## Manage environments
170173

@@ -253,9 +256,9 @@ ml_client.environments.create_or_update(environment=env)
253256
254257
### Archive
255258

256-
Archiving an environment will hide it by default from list queries (`az ml environment list`). You can still continue to reference and use an archived environment in your workflows. You can archive either all versions of an environment or only a specific version.
259+
Archiving an environment hides it by default from list queries (`az ml environment list`). You can still continue to reference and use an archived environment in your workflows. You can archive either all versions of an environment or only a specific version.
257260

258-
If you don't specify a version, all versions of the environment under that given name will be archived. If you create a new environment version under an archived environment container, that new version will automatically be set as archived as well.
261+
If you don't specify a version, all versions of the environment under that given name are archived. If you create a new environment version under an archived environment container, that new version is automatically set as archived as well.
259262

260263
Archive all versions of an environment:
261264

articles/machine-learning/how-to-managed-network.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ ms.custom:
2020

2121
[!INCLUDE [dev v2](includes/machine-learning-dev-v2.md)]
2222

23-
Azure Machine Learning provides support for managed virtual network (managed VNet) isolation. Managed VNet isolation streamlines and automates your network isolation configuration with a built-in, workspace-level Azure Machine Learning managed VNet.
23+
Azure Machine Learning provides support for managed virtual network (managed VNet) isolation. Managed VNet isolation streamlines and automates your network isolation configuration with a built-in, workspace-level Azure Machine Learning managed VNet. The managed VNet secures your managed Azure Machine Learning resources, such as compute instances, compute clusters, serverless compute, and managed online endpoints.
24+
25+
Securing your workspace with a *managed network* provides network isolation for __outbound__ access from the workspace and managed computes. An *Azure Virtual Network that you create and manage* is used to provide network isolation __inbound__ access to the workspace. For example, a private endpoint for the workspace is created in your Azure Virtual Network. Any clients connecting to the virtual network can access the workspace through the private endpoint. When running jobs on managed computes, the managed network restricts what the compute can access.
2426

2527
## Managed Virtual Network Architecture
2628

0 commit comments

Comments
 (0)