You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/machine-learning/how-to-troubleshoot-environments.md
+40-11Lines changed: 40 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -799,17 +799,46 @@ channels:
799
799
800
800
### *Conda issues*
801
801
### 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)
813
842
814
843
### Invalid conda dependencies
815
844
- Make sure the conda dependencies specified in your conda specification are formatted correctly
0 commit comments