Skip to content

Commit e62c7fc

Browse files
author
Larry Franks
committed
fixing tabs
1 parent 948ae64 commit e62c7fc

File tree

1 file changed

+33
-33
lines changed

1 file changed

+33
-33
lines changed

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

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ ms.custom: devx-track-azurecli, devplatv2, event-tier1-build-2022
1515

1616
# Manage Azure Machine Learning environments with the CLI (v2)
1717

18-
[!INCLUDE [cli v2](../../includes/machine-learning-cli-v2.md)]
18+
[!INCLUDE [dev v2](../../includes/machine-learning-dev-v2.md)]
1919

20-
> [!div class="op_single_selector" title1="Select the version of Azure Machine Learning CLI extension you are using:"]
20+
> [!div class="op_single_selector" title1="Select the version of Azure Machine Learning SDK or CLI extension you are using:"]
2121
> * [v1](./v1/how-to-use-environments.md)
2222
> * [v2 (current version)](how-to-manage-environments-v2.md)
2323
@@ -37,17 +37,17 @@ In this article, learn how to create and manage Azure ML environments using the
3737
3838
### Clone examples repository
3939

40-
To run the training examples, first clone the examples repository. For the CLI examples,change into the `cli` directory. For the SDK examples, change into the `SDK` directory:
40+
To run the training examples, first clone the examples repository. For the CLI examples, change into the `cli` directory. For the SDK examples, change into the `SDK` directory:
4141

4242
:::code language="azurecli" source="~/azureml-examples-main/cli/misc.sh" id="git_clone":::
4343

44-
Note that `--depth 1` clones only the latest commit to the repository which reduces time to complete the operation.
44+
Note that `--depth 1` clones only the latest commit to the repository, which reduces time to complete the operation.
4545

4646
## Curated environments
4747

4848
There are two types of environments in Azure ML: curated and custom environments. Curated environments are predefined environments containing popular ML frameworks and tooling. Custom environments are user-defined and can be created via `az ml environment create`.
4949

50-
Curated environments are provided by Azure ML and are available in your workspace by default. Azure ML routinely updates these environments with the latest framework version releases and maintains them for bug fixes and security patches. They are backed by cached Docker images, which reduces job preparation cost and model deployment time.
50+
Curated environments are provided by Azure ML and are available in your workspace by default. Azure ML routinely updates these environments with the latest framework version releases and maintains them for bug fixes and security patches. They're backed by cached Docker images, which reduce job preparation cost and model deployment time.
5151

5252
You can use these curated environments out of the box for training or deployment by referencing a specific environment using the `azureml:<curated-environment-name>:<version>` or `azureml:<curated-environment-name>@latest` syntax. You can also use them as reference for your own custom environments by modifying the Dockerfiles that back these curated environments.
5353

@@ -69,7 +69,7 @@ For the YAML reference documentation for Azure ML environments, see [CLI (v2) en
6969

7070
To define an environment from a Docker image, provide the image URI of the image hosted in a registry such as Docker Hub or Azure Container Registry.
7171

72-
# [Azure CLI](#tabs/cli)
72+
# [Azure CLI](#tab/cli)
7373

7474
The following example is a YAML specification file for an environment defined from a Docker image. An image from the official PyTorch repository on Docker Hub is specified via the `image` property in the YAML file.
7575

@@ -81,7 +81,7 @@ To create the environment:
8181
az ml environment create --file assets/environment/docker-image.yml
8282
```
8383

84-
# [Python SDK](#tabs/sdk)
84+
# [Python SDK](#tab/sdk)
8585

8686
The following example creates an environment from a Docker image. An image from the official PyTorch repository on Docker Hub is specified via the `image` property.
8787

@@ -105,7 +105,7 @@ ml_client.environments.create_or_update(env_docker_image)
105105

106106
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 and any other files needed to build the image.
107107

108-
# [Azure CLI](#tabs/cli)
108+
# [Azure CLI](#tab/cli)
109109

110110
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 ML will look for a Dockerfile named `Dockerfile` at the root of the build context.
111111

@@ -119,7 +119,7 @@ To create the environment:
119119
az ml environment create --file assets/environment/docker-context.yml
120120
```
121121

122-
# [Python SDK](#tabs/sdk)
122+
# [Python SDK](#tab/sdk)
123123

124124
In the following example, the local path to the build context folder is specified in the `path' parameter. Azure ML will look for a Dockerfile named `Dockerfile` at the root of the build context.
125125

@@ -140,9 +140,9 @@ Azure ML will start building the image from the build context when the environme
140140

141141
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.
142142

143-
You must also specify a base Docker image for this environment. Azure ML will build the conda environment on top of the Docker image provided. If you install some Python dependencies in your Docker image, those packages will not exist in the execution environment thus causing runtime failures. By default, Azure ML 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.
143+
You must also specify a base Docker image for this environment. Azure ML 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 ML 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.
144144

145-
## [Azure CLI](#tabs/cli)
145+
## [Azure CLI](#tab/cli)
146146

147147
The following example is a YAML specification file for an environment defined from a conda specification. Here the relative path to the conda file from the Azure ML environment YAML file is specified via the `conda_file` property. You can alternatively define the conda specification inline using the `conda_file` property, rather than defining it in a separate file.
148148

@@ -154,7 +154,7 @@ To create the environment:
154154
az ml environment create --file assets/environment/docker-image-plus-conda.yml
155155
```
156156

157-
## [Python SDK](#tabs/sdk)
157+
## [Python SDK](#tab/sdk)
158158

159159
The relative path to the conda file is specified using the `conda_file` parameter.
160160

@@ -180,13 +180,13 @@ The SDK and CLI (v2) also allow you to manage the lifecycle of your Azure ML env
180180

181181
List all the environments in your workspace:
182182

183-
# [Azure CLI](#tabs/cli)
183+
# [Azure CLI](#tab/cli)
184184

185185
```cli
186186
az ml environment list
187187
```
188188

189-
# [Python SDK](#tabs/sdk)
189+
# [Python SDK](#tab/sdk)
190190

191191
```python
192192
envs = ml_client.environments.list()
@@ -198,13 +198,13 @@ for env in envs:
198198

199199
List all the environment versions under a given name:
200200

201-
# [Azure CLI](#tabs/cli)
201+
# [Azure CLI](#tab/cli)
202202

203203
```cli
204204
az ml environment list --name docker-image-example
205205
```
206206

207-
# [Python SDK](#tabs/sdk)
207+
# [Python SDK](#tab/sdk)
208208

209209
```python
210210
envs = ml_client.environments.list(name="docker-image-example")
@@ -222,7 +222,7 @@ Get the details of a specific environment:
222222
az ml environment list --name docker-image-example --version 1
223223
```
224224

225-
# [Python SDK](#tabs/sdk)
225+
# [Python SDK](#tab/sdk)
226226

227227
```python
228228
env = ml_client.environments.get(name="docker-image-example", version="1")
@@ -234,13 +234,13 @@ print(env)
234234

235235
Update mutable properties of a specific environment:
236236

237-
# [Azure CLI](#tabs/cli)
237+
# [Azure CLI](#tab/cli)
238238

239239
```cli
240240
az ml environment update --name docker-image-example --version 1 --set description="This is an updated description."
241241
```
242242

243-
# [Python SDK](#tabs/sdk)
243+
# [Python SDK](#tab/sdk)
244244

245245
```python
246246
env.description="This is an updated description."
@@ -259,13 +259,13 @@ Archiving an environment container will archive all versions of the environment
259259

260260
Archive an environment container:
261261

262-
# [Azure CLI](#tabs/cli)
262+
# [Azure CLI](#tab/cli)
263263

264264
```cli
265265
az ml environment archive --name docker-image-example
266266
```
267267

268-
# [Python SDK](#tabs/sdk)
268+
# [Python SDK](#tab/sdk)
269269

270270
```python
271271
ml_client.environments.archive(name="docker-image-example")
@@ -275,13 +275,13 @@ ml_client.environments.archive(name="docker-image-example")
275275
276276
Archive a specific environment version:
277277

278-
# [Azure CLI](#tabs/cli)
278+
# [Azure CLI](#tab/cli)
279279

280280
```cli
281281
az ml environment archive --name docker-image-example --version 1
282282
```
283283

284-
# [Python SDK](#tabs/sdk)
284+
# [Python SDK](#tab/sdk)
285285

286286
```python
287287
ml_client.environments.archive(name="docker-image-example", version="1")
@@ -291,17 +291,17 @@ ml_client.environments.archive(name="docker-image-example", version="1")
291291

292292
You can restore an archived environment to no longer hide it from list queries.
293293

294-
If an entire environment container is archived, you can restore that archived container. You cannot restore only a specific environment version if the entire environment container is archived - you will need to restore the entire container.
294+
If an entire environment container is archived, you can restore that archived container. You can't restore only a specific environment version if the entire environment container is archived - you'll need to restore the entire container.
295295

296296
Restore an environment container:
297297

298-
# [Azure CLI](#tabs/cli)
298+
# [Azure CLI](#tab/cli)
299299

300300
```cli
301301
az ml environment restore --name docker-image-example
302302
```
303303

304-
# [Python SDK](#tabs/sdk)
304+
# [Python SDK](#tab/sdk)
305305

306306
```python
307307
ml_client.environments.restore(name="docker-image-example")
@@ -313,13 +313,13 @@ If only individual environment version(s) within an environment container are ar
313313

314314
Restore a specific environment version:
315315

316-
# [Azure CLI](#tabs/cli)
316+
# [Azure CLI](#tab/cli)
317317

318318
```cli
319319
az ml environment restore --name docker-image-example --version 1
320320
```
321321

322-
# [Python SDK](#tabs/sdk)
322+
# [Python SDK](#tab/sdk)
323323

324324
```python
325325
ml_client.environments.restore(name="docker-image-example", version="1")
@@ -329,11 +329,11 @@ ml_client.environments.restore(name="docker-image-example", version="1")
329329

330330
## Use environments for training
331331

332-
# [Azure CLI](#tabs/cli)
332+
# [Azure CLI](#tab/cli)
333333

334-
To use an environment for a training job, specify the `environment` field of the job YAML configuration. You can either reference an existing registered Azure ML environment via `environment: azureml:<environment-name>:<environment-version>` or `environment: azureml:<environment-name>@latest` (to reference the latest version of an environment), or define an environment specification inline. If defining an environment inline, do not specify the `name` and `version` fields, as these environments are treated as "unregistered" environments and are not tracked in your environment asset registry.
334+
To use an environment for a training job, specify the `environment` field of the job YAML configuration. You can either reference an existing registered Azure ML environment via `environment: azureml:<environment-name>:<environment-version>` or `environment: azureml:<environment-name>@latest` (to reference the latest version of an environment), or define an environment specification inline. If defining an environment inline, don't specify the `name` and `version` fields, as these environments are treated as "unregistered" environments and aren't tracked in your environment asset registry.
335335

336-
# [Python SDK](#tabs/sdk)
336+
# [Python SDK](#tab/sdk)
337337

338338
To use an environment for a training job, specify the `environment` property of the [command](/python/api/azure-ai-ml/azure.ai.ml#azure-ai-ml-command).
339339

@@ -348,13 +348,13 @@ For more information on how to use environments in jobs, see [Train models](how-
348348

349349
## Use environments for model deployments
350350

351-
# [Azure CLI](#tabs/cli)
351+
# [Azure CLI](#tab/cli)
352352

353353
You can also use environments for your model deployments for both online and batch scoring. To do so, specify the `environment` field in the deployment YAML configuration.
354354

355355
For more information on how to use environments in deployments, see [Deploy and score a machine learning model by using a managed online endpoint](how-to-deploy-managed-online-endpoints.md).
356356

357-
# [Python SDK](#tabs/sdk)
357+
# [Python SDK](#tab/sdk)
358358

359359
You can also use environments for your model deployments. For more information, see [Deploy and score a machine learning model](how-to-deploy-managed-online-endpoint-sdk-v2.md).
360360

0 commit comments

Comments
 (0)