Skip to content

Commit e7db333

Browse files
authored
Update how-to-troubleshoot-environments.md
1 parent 281e497 commit e7db333

File tree

1 file changed

+28
-29
lines changed

1 file changed

+28
-29
lines changed

articles/machine-learning/how-to-troubleshoot-environments.md

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Environments fall under three categories: curated, user-managed, and system-mana
2929

3030
Curated environments are pre-created environments managed by Azure Machine Learning (AzureML) and are available by default in every workspace.
3131

32-
They contain collections of Python packages and settings to help you get started with various machine learning frameworks and are intended for you to use as is.
32+
They contain collections of Python packages and settings to help you get started with various machine learning frameworks. You're meant to use them as is.
3333
These pre-created environments also allow for faster deployment time.
3434

3535
In user-managed environments, you're responsible for setting up your environment and installing every package that your training script needs on the compute target.
@@ -76,7 +76,7 @@ user-managed, and system-managed.
7676

7777
**Curated environments** are pre-created environments that Azure Machine Learning (AzureML) manages and are available by default in every AzureML workspace provisioned.
7878

79-
They contain collections of Python packages and settings to help you get started with various machine learning frameworks and are intended for you to use as is.
79+
They contain collections of Python packages and settings to help you get started with various machine learning frameworks. You're meant to use them as is.
8080
These pre-created environments also allow for faster deployment time.
8181

8282
In **user-managed environments**, you're responsible for setting up your environment and installing every package that your training script needs on the
@@ -88,13 +88,12 @@ compute target and for model deployment. These types of environments have two su
8888
Once you install more dependencies on top of a Microsoft-provided image, or bring your own base image, vulnerability
8989
management becomes your responsibility.
9090

91-
You use **system-managed environments** when you want conda to manage the Python environment for you. A new isolated conda environment is materialized
92-
from your conda specification on top of a base Docker image. While Azure Machine Learning patches base images with each release, whether you use the
91+
You use **system-managed environments** when you want conda to manage the Python environment for you. AzureML creates a new isolated conda environment by materializing your conda specification on top of a base Docker image. While Azure Machine Learning patches base images with each release, whether you use the
9392
latest image may be a tradeoff between reproducibility and vulnerability management. So, it's your responsibility to choose the environment version used
9493
for your jobs or model deployments while using system-managed environments.
9594

96-
Associated to your Azure Machine Learning workspace is an Azure Container Registry instance that's used as a cache for container images. Any image
97-
materialized is pushed to the container registry and used if experimentation or deployment is triggered for the corresponding environment. Azure
95+
Associated to your Azure Machine Learning workspace is an Azure Container Registry instance that's a cache for container images. Any image
96+
materialized is pushed to the container registry and used if you trigger experimentation or deployment for the corresponding environment. Azure
9897
Machine Learning doesn't delete images from your container registry, and it's your responsibility to evaluate which images you need to maintain over time. You
9998
can monitor and maintain environment hygiene with [Microsoft Defender for Container Registry](../defender-for-cloud/defender-for-containers-vulnerability-assessment-azure.md)
10099
to help scan images for vulnerabilities. To
@@ -157,11 +156,11 @@ To create a new environment, you must use one of the following approaches:
157156
* Provide the image URI of the image hosted in a registry such as Docker Hub or Azure Container Registry
158157
* [Sample here](https://aka.ms/azureml/environment/create-env-docker-image-v2)
159158
* Docker build context
160-
* Specify the directory that will serve as the build context
159+
* Specify the directory that serves as the build context
161160
* The directory should contain a Dockerfile and any other files needed to build the image
162161
* [Sample here](https://aka.ms/azureml/environment/create-env-build-context-v2)
163162
* Conda specification
164-
* You must specify a base Docker image for the environment; the conda environment will be built on top of the Docker image provided
163+
* You must specify a base Docker image for the environment; AzureML builds the conda environment on top of the Docker image provided
165164
* Provide the relative path to the conda file
166165
* [Sample here](https://aka.ms/azureml/environment/create-env-conda-spec-v2)
167166

@@ -171,7 +170,7 @@ To create a new environment, you must use one of the following approaches:
171170
This issue can happen when your environment definition is missing a `DockerSection.` This section configures settings related to the final Docker image built from your environment specification.
172171

173172
**Potential causes:**
174-
* The `DockerSection` of your environment definition isn't defined (null)
173+
* You didn't specify the `DockerSection` of your environment definition
175174

176175
**Affected areas (symptoms):**
177176
* Failure in registering your environment
@@ -419,7 +418,7 @@ az ml connection create --file connection.yml --resource-group my-resource-group
419418
**Potential causes:**
420419

421420
* You've specified Docker attributes in your environment definition that are now deprecated
422-
* The following are deprecated:
421+
* The following are deprecated properties:
423422
* `enabled`
424423
* `arguments`
425424
* `shared_volumes`
@@ -484,7 +483,7 @@ Ensure that you include a path for your build context
484483

485484
### Missing Dockerfile path
486485
<!--issueDescription-->
487-
This issue can happen when AzureML fails to find your Dockerfile. As a default, AzureML will look for a Dockerfile named 'Dockerfile' at the root of your build context directory unless a Dockerfile path is specified.
486+
This issue can happen when AzureML fails to find your Dockerfile. As a default, AzureML looks for a Dockerfile named 'Dockerfile' at the root of your build context directory unless you specify a Dockerfile path.
488487

489488
**Potential causes:**
490489
* Your Dockerfile isn't at the root of your build context directory and/or is named something other than 'Dockerfile,' and you didn't provide its path
@@ -514,7 +513,7 @@ Specify a Dockerfile path
514513
This issue can happen when you've specified properties in your environment definition that can't be included with a Docker build context.
515514

516515
**Potential causes:**
517-
* You specified a Docker build context, along with at least one of the following in your environment definition:
516+
* You specified a Docker build context, along with at least one of the following properties in your environment definition:
518517
* Environment variables
519518
* Conda dependencies
520519
* R
@@ -528,7 +527,7 @@ This issue can happen when you've specified properties in your environment defin
528527

529528
*Applies to: Python SDK v1*
530529

531-
If any of the above-listed properties are specified in your environment definition, remove them
530+
If you specified any of the above-listed properties in your environment definition, remove them
532531
* If you're using a Docker build context and want to specify conda dependencies, your conda specification should reside in your build context directory
533532

534533
**Resources**
@@ -550,7 +549,7 @@ If any of the above-listed properties are specified in your environment definiti
550549

551550
The following are accepted location types:
552551
* Git
553-
* Git URLs can be provided to AzureML, but images can't yet be built using them. Use a storage account until builds have Git support
552+
* You can provide git URLs to AzureML, but you can't use them to build images yet. Use a storage account until builds have Git support
554553
* Storage account
555554
* See this [storage account overview](../storage/common/storage-account-overview.md)
556555
* See how to [create a storage account](../storage/common/storage-account-create.md)
@@ -573,7 +572,7 @@ The following are accepted location types:
573572
*Applies to: Python SDK v1*
574573

575574
For scenarios in which you're storing your Docker build context in a storage account
576-
* The path of the build context must be specified as
575+
* You must specify the path of the build context as
577576

578577
`https://<storage-account>.blob.core.windows.net/<container>/<path>`
579578
* Ensure that the location you provided is a valid URL
@@ -590,7 +589,7 @@ For scenarios in which you're storing your Docker build context in a storage acc
590589
**Potential causes:**
591590
* You used a deprecated base image
592591
* AzureML can't provide troubleshooting support for failed builds with deprecated images
593-
* These images aren't updated or maintained, so they're at risk of vulnerabilities
592+
* AzureML doesn't update or maintain these images, so they're at risk of vulnerabilities
594593

595594
The following base images are deprecated:
596595
* `azureml/base`
@@ -623,15 +622,15 @@ Upgrade your base image to a latest version of supported images
623622
<!--issueDescription-->
624623
**Potential causes:**
625624
* You didn't include a version tag or a digest on your specified base image
626-
* Without one of these, the environment isn't reproducible
625+
* Without one of these specifiers, the environment isn't reproducible
627626

628627
**Affected areas (symptoms):**
629628
* Failure in registering your environment
630629
<!--/issueDescription-->
631630

632631
**Troubleshooting steps**
633632

634-
Include at least one of the following on your specified base image
633+
Include at least one of the following specifiers on your base image
635634
* Version tag
636635
* Digest
637636
* See [image with immutable identifier](https://aka.ms/azureml/environment/pull-image-by-digest)
@@ -765,7 +764,7 @@ Specify a [python version](https://aka.ms/azureml/environment/python-versions) t
765764
### Failed to validate Python version
766765
<!--issueDescription-->
767766
**Potential causes:**
768-
* The provided Python version was formatted improperly or specified with incorrect syntax
767+
* You specified a Python version with incorrect syntax or improper formatting
769768

770769
**Affected areas (symptoms):**
771770
* Failure in registering your environment
@@ -819,7 +818,7 @@ env.python.user_managed_dependencies = True
819818
```
820819
* You're responsible for ensuring that all necessary packages are available in the Python environment in which you choose to run the script
821820

822-
If you want AzureML to create a Python environment for you based on a conda specification, `conda_dependencies` needs to be populated in your environment definition
821+
If you want AzureML to create a Python environment for you based on a conda specification, you must populate `conda_dependencies` in your environment definition
823822

824823
```python
825824
from azureml.core.environment import CondaDependencies
@@ -832,7 +831,7 @@ env.python.conda_dependencies = conda_dep
832831

833832
*Applies to: Azure CLI & Python SDK v2*
834833

835-
You must specify a base Docker image for the environment, and the conda environment will be built on top of that image
834+
You must specify a base Docker image for the environment, and AzureML will build the conda environment on top of that image
836835
* Provide the relative path to the conda file
837836
* See how to [create an environment from a conda specification](https://aka.ms/azureml/environment/create-env-conda-spec-v2)
838837

@@ -844,7 +843,7 @@ You must specify a base Docker image for the environment, and the conda environm
844843
### Invalid conda dependencies
845844
<!--issueDescription-->
846845
**Potential causes:**
847-
* The conda dependencies specified in your environment definition aren't formatted correctly
846+
* You incorrectly formatted the conda dependencies specified in your environment definition
848847

849848
**Affected areas (symptoms):**
850849
* Failure in registering your environment
@@ -874,7 +873,7 @@ Ensure that `conda_dependencies` is a JSONified version of the conda dependencie
874873
}
875874
```
876875

877-
Conda dependencies can also be specified using the `add_conda_package` method
876+
You can also specify conda dependencies using the `add_conda_package` method
878877

879878
```python
880879
from azureml.core.environment import CondaDependencies
@@ -887,7 +886,7 @@ env.python.conda_dependencies = conda_dep
887886

888887
*Applies to: Azure CLI & Python SDK v2*
889888

890-
You must specify a base Docker image for the environment, and the conda environment will be built on top of that image
889+
You must specify a base Docker image for the environment, and AzureML will build the conda environment on top of that image
891890
* Provide the relative path to the conda file
892891
* See how to [create an environment from a conda specification](https://aka.ms/azureml/environment/create-env-conda-spec-v2)
893892

@@ -908,7 +907,7 @@ You must specify a base Docker image for the environment, and the conda environm
908907

909908
**Troubleshooting steps**
910909

911-
For reproducibility of your environment, specify channels from which to pull dependencies. If no conda channel is specified, conda will use defaults that might change.
910+
For reproducibility of your environment, specify channels from which to pull dependencies. If you don't specify conda channels, conda uses defaults that might change.
912911

913912
*Applies to: Python SDK v1*
914913

@@ -992,7 +991,7 @@ Define an environment using a standard conda YAML configuration file
992991

993992
**Troubleshooting steps**
994993

995-
If a dependency version isn't specified, the conda package resolver may choose a different version of the package on subsequent builds of the same environment. This breaks reproducibility of the environment and can lead to unexpected errors.
994+
If you don't specify a dependency version, the conda package resolver may choose a different version of the package on subsequent builds of the same environment. This breaks reproducibility of the environment and can lead to unexpected errors.
996995

997996
*Applies to: Python SDK v1*
998997

@@ -1035,7 +1034,7 @@ channels:
10351034

10361035
**Troubleshooting steps**
10371036

1038-
For reproducibility, pip should be specified as a dependency in your conda specification, and it should be pinned.
1037+
For reproducibility, you should specify and pin pip as a dependency in your conda specification.
10391038

10401039
*Applies to: Python SDK v1*
10411040

@@ -1075,7 +1074,7 @@ channels:
10751074

10761075
**Troubleshooting steps**
10771076

1078-
If a pip version isn't specified, a different version may be used on subsequent builds of the same environment. This can cause reproducibility issues and other unexpected errors if different versions of pip resolve your packages differently.
1077+
If you don't specify a pip version, a different version may be used on subsequent builds of the same environment. This behavior can cause reproducibility issues and other unexpected errors if different versions of pip resolve your packages differently.
10791078

10801079
*Applies to: Python SDK v1*
10811080

@@ -1145,7 +1144,7 @@ See the [samples repository](https://aka.ms/azureml/environment/train-r-models-c
11451144
Ensure that you are specifying your environment name correctly, along with the correct version
11461145
* `path-to-resource:version-number`
11471146

1148-
The 'latest' version of your environment is specified in a slightly different way
1147+
You should specify the 'latest' version of your environment in a different way
11491148
* `path-to-resource@latest`
11501149

11511150
## **Image build problems**

0 commit comments

Comments
 (0)