Warm tip: This article is reproduced from stackoverflow.com, please click
azure azure-cli azure-machine-learning-service

Can I use Azure interactive mode for azure-cli-ml extension?

发布于 2020-05-10 20:55:08

I'm using Azure CLI interactive mode az interactive to run below command.
az ml folder attach -w yhd-mlws -g yhd-mlws-rg

It prompts me with below error message.
az: error: unrecognized arguments: -w yhd-mlws -g yhd-mlws-rg

BTW, both my Machine Learning workspace yhd-mlws and resource group yhd-mlws-rg had been created in my Azure subscription. Azure CLI extension for machine learning service had also been installed via az extension add -n azure-cli-ml.

Then I run command az ml folder attach without any argument. I get bellow error message.

Message: Error, default workspace not set and workspace name parameter not provided.
Please set a default workspace using "az ml folder attach -w myworkspace -g myresourcegroup" or provide a value for the workspace name parameter.

The command window exit the interactive mode after above error message. Then I try the command az ml folder attach -w yhd-mlws -g yhd-mlws-rg again, bingo! It works.
Here comes my question, does azure-cli-ml extension support Azure CLI interactive mode? You know, Azure CLI interactive mode is amazing and I want to use it whenever possible. Thanks!

BTW, I'm running windows command window in Windows Server 2016 Datcenter. Azure-cli version is 2.0.79.

Questioner
Huodong
Viewed
30
Joy Wang 2020-02-26 11:11

I can reproduce your issue, the interactive mode should support the azure-cli-ml extension, because when I run az ml workspace list, it works, once I pass the -g parameter, it gives the same error, maybe it is a bug, but I am not sure, the interactive is in preview currently.

enter image description here

If you want to run az ml folder attach -w yhd-mlws -g yhd-mlws-rg in the interactive mode, my workaround is to pass the #, i.e. # az ml folder attach -w yhd-mlws -g yhd-mlws-rg.

enter image description here