Skip to content

Commit a44b55d

Browse files
authored
Update how-to-troubleshoot-environments.md
1 parent b0e0943 commit a44b55d

File tree

1 file changed

+54
-2
lines changed

1 file changed

+54
-2
lines changed

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

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -841,8 +841,60 @@ You must specify a base Docker image for the environment, and the conda environm
841841
* See [how to set a conda specification on the environment definition](https://aka.ms/azureml/environment/set-conda-spec-on-environment-definition)
842842

843843
### Invalid conda dependencies
844-
- Make sure the conda dependencies specified in your conda specification are formatted correctly
845-
- See [how to create a conda file manually](https://aka.ms/azureml/environment/how-to-create-conda-file)
844+
<!--issueDescription-->
845+
**Potential causes:**
846+
* The conda dependencies specified in your environment definition aren't formatted correctly
847+
848+
**Affected areas (symptoms):**
849+
* Failure in registering your environment
850+
<!--/issueDescription-->
851+
852+
**Troubleshooting steps**
853+
854+
*Applies to: Python SDK v1*
855+
856+
Ensure that `conda_dependencies` is a JSONified version of the conda dependencies YAML structure
857+
858+
```json
859+
"condaDependencies": {
860+
"channels": [
861+
"anaconda",
862+
"conda-forge"
863+
],
864+
"dependencies": [
865+
"python=3.8",
866+
{
867+
"pip": [
868+
"azureml-defaults"
869+
]
870+
}
871+
],
872+
"name": "project_environment"
873+
}
874+
```
875+
876+
Conda dependencies can also be specified using the `add_conda_package` method
877+
878+
```python
879+
from azureml.core.environment import CondaDependencies
880+
881+
env = Environment(name="env")
882+
conda_dep = CondaDependencies()
883+
conda_dep.add_conda_package("python==3.8")
884+
env.python.conda_dependencies=conda_dep
885+
```
886+
887+
*Applies to: Azure CLI & Python SDK v2*
888+
889+
You must specify a base Docker image for the environment, and the conda environment will be built on top of that image
890+
* Provide the relative path to the conda file
891+
* See how to [create an environment from a conda specification](https://aka.ms/azureml/environment/create-env-conda-spec-v2)
892+
893+
**Resources**
894+
* See [more extensive examples](https://github.com/Azure/MachineLearningNotebooks/blob/9b1e130d18d3c61d41dc225488a4575904897c85/how-to-use-azureml/training/using-environments/using-environments.ipynb)
895+
* See [how to create a conda file manually](https://aka.ms/azureml/environment/how-to-create-conda-file)
896+
* See [CondaDependencies class](https://aka.ms/azureml/environment/conda-dependencies-class)
897+
* See [how to set a conda specification on the environment definition](https://aka.ms/azureml/environment/set-conda-spec-on-environment-definition)
846898

847899
### Missing conda channels
848900
- If no conda channels are specified, conda will use defaults that might change

0 commit comments

Comments
 (0)