I am trying to print a .yml file for an environment. I can do it for this environment:
env = Environment.get(workspace = ws, name = 'AzureML-AutoML', version=115)
print(env)
print(env.python.conda_dependencies.serialize_to_string())
>>>Environment(Name: AzureML-AutoML,
Version: 115)
channels:
- anaconda
- conda-forge
- pytorch
dependencies:
- python=3.7.9
- pip=20.2.4
- pip:
- azureml-core==1.42.0
- azureml-mlflow==1.42.0
...
When I use the same code for this other environment I get an error:
infer_env = 'AzureML-pytorch-1.10-ubuntu18.04-py37-cpu-inference'
curated_pytorch_infer_env = Environment.get(workspace = ws, name = infer_env, version=4)
print(curated_pytorch_infer_env)
print(curated_pytorch_infer_env.python.conda_dependencies.serialize_to_string())
>>> AttributeError: 'NoneType' object has no attribute 'serialize_to_string'
How do I get/print a .yml file for 'curated_pytorch_infer_env'?