microsoft / azuredevopslabs

Learn how you can plan smartly, collaborate better, and ship faster with a set of modern development services with Azure DevOps.
https://www.azuredevopslabs.com
MIT License
828 stars 920 forks source link

Error in Enabling CI/CD for Machine Learning project with Azure Pipelines #463

Closed tilakmishra closed 3 years ago

tilakmishra commented 3 years ago

Hi,

While working on Enabling CI/CD for Machine Learning project with Azure Pipelines, the pipeline is failing with an error message "You have access to more than one subscriptions"

Whereas, I only see one subscription tied. Could you help to resolve? It would be good to check in the code, why its complaining of more than one subscription. Thanks.

auth=cli_auth

File "/opt/hostedtoolcache/Python/3.6.12/x64/lib/python3.6/site-packages/azureml/core/workspace.py", line 565, in get subscription_id, auth=auth, resource_group=resource_group) File "/opt/hostedtoolcache/Python/3.6.12/x64/lib/python3.6/site-packages/azureml/core/workspace.py", line 644, in list subscription_id = subscription_tuple.subscription_id AttributeError: 'list' object has no attribute 'subscription_id'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "aml_service/00-WorkSpace.py", line 60, in auth=cli_auth File "/opt/hostedtoolcache/Python/3.6.12/x64/lib/python3.6/site-packages/azureml/core/workspace.py", line 476, in create "Please specify one from this list = {}".format(all_subscriptions)) azureml.exceptions._azureml_exception.WorkspaceException: WorkspaceException: Message: You have access to more than one subscriptions. Please specify one from this list = ([SubscriptionInfo(subscription_name='Visual Studio Enterprise', subscription_id='371936f0-8875-4bd5-a192-f47cb322bb31')], '') InnerException None ErrorResponse { "error": { "message": "You have access to more than one subscriptions. Please specify one from this list = ([SubscriptionInfo(subscription_name='Visual Studio Enterprise', subscription_id='371936f0-8875-4bd5-a192-f47cb322bb31')], '')" } }

[error]Script failed with error: Error: The process '/bin/bash' failed with exit code 1

/opt/hostedtoolcache/Python/3.6.12/x64/bin/az account clear

tilakmishra commented 3 years ago

I missed to mention subscription id in the config.json file.