Azure / mlops-v2

Azure MLOps (v2) solution accelerators. Enterprise ready templates to deploy your machine learning models on the Azure Platform.
https://learn.microsoft.com/en-us/azure/machine-learning/concept-model-management-and-deployment
MIT License
503 stars 248 forks source link

Python SDK issue with azure-cli version 2.29 #34

Closed nmoellerms closed 2 years ago

nmoellerms commented 2 years ago

Hey together,

first of all thanks alot for the great tool, i am really enjoing version 2 of the mlops. It is very powerful and really helps to speed up the mlops process for customers.

There is some version problem i am currently experiencing with the python-sdk.

image

How to replicate the problem :

  1. Run the sparse_check.sh to create a new classical with the python sdk
  2. Run the training pipeline

What causes the problem ?

The problem is that the new version of the az ml cli is not working with azure-cli version 2.29 even longer, it needs at least version 2.30.

Where is the problem located ?

Currently the version 2.29 of the azure-cli is hardcoded in the mlops-template file (install-az-cli.yaml)

What did i try to fix it ?

i changed the version in the yaml file to the desired version 2.30, but then i ran into the next problem. After increasing the version the method Workspace.from_config() method wanted me to use a DeviceLogin inside the Pipeline. That indicates, that it does not use the AzCli Authentication somehow.

Screenshot after increasing the version :

image

Some help would be apreciated, i will also keep trying to fix it :)

nmoellerms commented 2 years ago

It looks like the device authentication problem happens because of the python-sdk version.

In the install_requirements.sh is the version specified for the AzureML SDK which should be used for the pipeline, when you use version 1.48 for the sdk its working.

So for me the fix was to adjust two files:

  1. In install_requirements.sh replace the azureml-sdk version 1.36 with version 1.48
  2. In install-az-cli.yml replace the azure-cli version 2.29 with 2.30

I haven't tested everything so changing the version could maybe mess up other stuff

mariamedp commented 2 years ago

Fixed here: https://github.com/Azure/mlops-templates/pull/12