Description
- Package Name:
azure-ai-ml
- Package Version: 1.26.3
- Operating System: Debian 6.1.133-1
- Python Version: 3.11.10
Describe the bug
ModelOperations.list()
(note that name
argument is not provided), returns an iterable of models, which tags
attribute is always an empty dictionary.
To Reproduce
Steps to reproduce the behavior:
from azure.ai.ml import MLClient
from azure.identity import DefaultAzureCredential
client = MLClient(
credential=DefaultAzureCredential(),
subscription_id="<value>",
resource_group_name="<value>",
workspace_name="<value>",
)
# tags attribute of every model in models is an empty dictionary
models = client.models.list()
Since the issue is caused by underlying REST API call, one call also reproduce it by calling this endpoint.
Expected behavior
ModelOperations.list()
returns a iterable of models with tags included.
Additional context
Interestingly, the corresponding API in Python SDK v1 which used /modelmanagement/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.MachineLearningServices/workspaces/{workspace}/models
endpoint returns a list of models with tags.
I'd like to switch to SDK v2, since v1 it's getting deprecated next year, but this bug makes the switch impossible.
An alternative approach with multiple ModelOperations.get(name="somename")
calls (which return all the tags) is not acceptable, since I'm operating on thousands of models.