Skip to content

CLI calls the wrong version SDK when a different version SDK is installed in current pyenv #12062

@gogowings

Description

@gogowings

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Describe the bug
Details are in microsoft/MLOpsPython#136

To Reproduce
NOTE: to repro the error reported in microsoft/MLOpsPython#136 you will need more setup, such as creating ML workspace, register a model etc. The following repro step is simplified. You won't see an error but you will see the symptom of different version SDK is loaded.

step 1: install latest azure-cli-ml: az extension add -n azure-cli-ml (or az extension update -n azure-cli-ml).
You should get version 1.0.85. SDK version is correct as you can see from
$HOME/.azure/cliextensions/azure-cli-ml/azureml_core*

step 2: create a pyenv, can be conda, venv, doesn't matter. I use venv
python -m venv test-venv
source test-venv/bin/activate

step 3: install a different version of azureml-core
pip install azureml-core==1.0.79

step 4: run an ml CLI command: az ml workspace list -g abc --debug (doesn't matter whether resource group abc exists or not)
In the debug level log, you will see SDK 1.0.79 is loaded (you will see 'azureml-core 1.0.79' in debug output)

In the real error case, there is a change in azureml-core 1.0.81 which introduces a new required parameter.

Expected behavior
A clear and concise description of what you expected to happen.

Environment summary
Install Method (e.g. pip, interactive script, apt-get, Docker, MSI, edge build) / CLI version (az --version) / OS version / Shell Type (e.g. bash, cmd.exe, Bash on Windows)

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

ML-MLOpsAreaPathMachine Learningaz mlquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions