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://docs.microsoft.com/python/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-python.
MIT License
4.36k stars 2.71k forks source link

az env list returns incomplete response #29248

Open novaturient95 opened 1 year ago

novaturient95 commented 1 year ago

Describe the bug Inconsistent behavior of az ml environment list -n <env_name>

Environemnt

[
  {
    "name": "model-management-preview",
    "version": "0.0.1-azureml-dev.1678366019"
  },
]

Component

[
  {
    "$schema": "https://azuremlschemas.azureedge.net/development/pipelineComponent.schema.json",
    "creation_context": {
      "created_at": "2023-03-09T06:43:51.075890+00:00",
      "created_by": "f8cc35e5-7d90-451f-9d0f-f46d76ef7378",
      "created_by_type": "Application",
      "last_modified_at": "2023-03-09T06:43:51.075890+00:00",
      "last_modified_by": "f8cc35e5-7d90-451f-9d0f-f46d76ef7378",
      "last_modified_by_type": "Application"
    },
    "display_name": "Test registry pipeline component",
    "id": "azureml://registries/azureml-dev/components/TestRegistryPipelineComponent/versions/638139410277261168",
    "inputs": {
      "compute_name": {
        "type": "string"
      }
    },
    "is_deterministic": false,
    "name": "TestRegistryPipelineComponent",
    "type": "pipeline",
    "version": "638139410277261168"
  }
]

Model response

[
  {
    "creation_context": {
      "created_at": "2022-11-28T06:56:49.116395+00:00",
      "created_by": "Dhruv Eddi",
      "created_by_type": "User",
      "last_modified_at": "2023-03-09T13:30:40.486755+00:00",
      "last_modified_by": "Dhruv Eddi",
      "last_modified_by_type": "User"
    },
    "description": "",
    "id": "azureml://registries/azureml-dev/models/dummy/versions/135",
    "model type": "mlflow_model",
    "name": "dummy",
    "path": "https://amldevos5mguse01.blob.core.windows.net/azureml-de-9cc9de09-15d2-5726-a547-4486d8ca7da9/mlflow_model_folder",
    "properties": {},
    "tags": {},
    "version": "135"
  },
]

To Reproduce Steps to reproduce the behavior:

  1. run az ml environment list and compare with model, component and data

Expected behavior

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

kashifkhan commented 1 year ago

Thank you for the feedback @novaturient95. We will investigate and get back to you asap.

cc @azureml-github

luigiw commented 1 year ago

@novaturient95 Thx for the feedback, what environment properties do you expect to see in the environment list?

novaturient95 commented 1 year ago

@luigiw I was thinking to use env list operation to find out versions registered and their respective assetID's. Name and version are there but remaining information are missing as of you can see in the snippet, I've shared in the bug description. Also there is a confirmation from vizhur that service is sending correct response, but CLI is not parsing it correctly.

hswang-wang commented 1 year ago

@novaturient95 @luigiw It's a bug on client side. I've created a repair item to track this issue.

novaturient95 commented 1 year ago

there are couple of more behaviours which needs address:

  1. List operation in case of environment raises exception if env version does not exist. This is not the case with model or component.
  2. There is a difference in behavior in list vs show. List does not list env such as Azureml-AutoML which is a curated env used for AutoML execution specifically. But show list details of this curated env. Is this intentional or some bug that needs fixing?
vizhur commented 1 year ago

@novaturient95

  1. seems correct, it won't throw id environment exist but does not have types listed for list(), like archived, deleted or anonymous
  2. by design, automl environment is marked as system by the asset owner, hence excluded from index/list
hswang-wang commented 1 year ago

@novaturient95 Thanks for your feedback. We validated that the command only returns name and version is by designed. We've created an work item to track your feedback and will address it soon.