Skip to content

Commit 7305e1c

Browse files
authored
Update how-to-troubleshoot-environments.md
1 parent 148270f commit 7305e1c

File tree

1 file changed

+40
-11
lines changed

1 file changed

+40
-11
lines changed

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

Lines changed: 40 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -799,17 +799,46 @@ channels:
799799
800800
### *Conda issues*
801801
### Missing conda dependencies
802-
- The [environment definition](https://aka.ms/azureml/environment/environment-class-v1)
803-
has a [PythonSection](https://aka.ms/azureml/environment/environment-python-section)
804-
that contains a `user_managed_dependencies` bool and a `conda_dependencies` object
805-
- If `user_managed_dependencies` is set to `True`, you're responsible for ensuring that all the necessary packages are available in the
806-
Python environment in which you choose to run the script
807-
- If `user_managed_dependencies` is set to `False` (the default), Azure ML will create a Python environment for you based on `conda_dependencies`.
808-
The environment is built once and is reused as long as the conda dependencies remain unchanged
809-
- You'll receive a *"missing conda dependencies"* error when `user_managed_dependencies` is set to `False` and you haven't provided a conda specification.
810-
- See [how to create a conda file manually](https://aka.ms/azureml/environment/how-to-create-conda-file)
811-
- See [CondaDependencies class](https://aka.ms/azureml/environment/conda-dependencies-class)
812-
- See [how to set a conda specification on the environment definition](https://aka.ms/azureml/environment/set-conda-spec-on-environment-definition)
802+
<!--issueDescription-->
803+
**Potential causes:**
804+
* You haven't provided a conda specification in your environment definition, and `user_managed_dependencies` is set to `False` (the default)
805+
806+
**Affected areas (symptoms):**
807+
* Failure in registering your environment
808+
<!--/issueDescription-->
809+
810+
**Troubleshooting steps**
811+
812+
*Applies to: Python SDK v1*
813+
814+
If you don't want AzureML to create a Python environment for you based on `conda_dependencies,` set `user_managed_dependencies` to `True`
815+
816+
```python
817+
env.python.user_managed_dependencies = True
818+
```
819+
* You're responsible for ensuring that all necessary packages are available in the Python environment in which you choose to run the script
820+
821+
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
822+
823+
```python
824+
from azureml.core.environment import CondaDependencies
825+
826+
env = Environment(name="env")
827+
conda_dep = CondaDependencies()
828+
conda_dep.add_conda_package("python==3.8")
829+
env.python.conda_dependencies=conda_dep
830+
```
831+
832+
*Applies to: Azure CLI & Python SDK v2*
833+
834+
You must specify a base Docker image for the environment, and the conda environment will be built on top of that image
835+
* Provide the relative path to the conda file
836+
* See how to [create an environment from a conda specification](https://aka.ms/azureml/environment/create-env-conda-spec-v2)
837+
838+
**Resources**
839+
* See [how to create a conda file manually](https://aka.ms/azureml/environment/how-to-create-conda-file)
840+
* See [CondaDependencies class](https://aka.ms/azureml/environment/conda-dependencies-class)
841+
* See [how to set a conda specification on the environment definition](https://aka.ms/azureml/environment/set-conda-spec-on-environment-definition)
813842

814843
### Invalid conda dependencies
815844
- Make sure the conda dependencies specified in your conda specification are formatted correctly

0 commit comments

Comments
 (0)