Azure / azure-sdk-for-python

This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/python/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-python.
MIT License
4.63k stars 2.84k forks source link

Cannot use curated environment from azureml registry in command job #38594

Open IvanHahan opened 3 hours ago

IvanHahan commented 3 hours ago

Describe the bug When I call az ml job create --file <my_file>.yml, specifying one of the curated environments acft-mmdetection-image-gpu I get the error:

(UserError) No environment exists for name: acft-mmdetection-image-gpu, version: 46, label: 
Code: UserError
Message: No environment exists for name: acft-mmdetection-image-gpu, version: 46, label: 

az ml package is unable to find this existing environment acft-mmdetection-image-gpu under azureml registry.

When I perform az ml environment list, I'm unable to see acft-mmdetection-image-gpu environment in the list. I can see this environment when I execute az ml environment list --registry azureml.

I also tried setting my environment in the job.yml file as environment: azureml://registries/azureml/environments/acft-mmdetection-image-gpu/versions/46, but it doesn't work either. same error appears.

What I can do is creating a custom environment that is inherited from the specified environment above and use it. But what should I do to use the original acft-mmdetection-image-gpu environment in my job?

To Reproduce

My job.yml file:

$schema: https://azuremlschemas.azureedge.net/latest/commandJob.schema.json
command: >-
  echo ""
environment: azureml:acft-mmdetection-image-gpu:46
compute: A100
resources:
  docker_args: '--ipc=host'
  instance_count: 1

Steps to reproduce the behavior:

  1. call az ml job create --file job.yml

Expected behavior The training job is created

github-actions[bot] commented 3 hours ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/azure-ml-sdk @azureml-github.