1

I'm trying to create a dataset on my azure ML workspace from a GitHub action

I've created a datastore and uploaded data to that datastore when I try to create a dataset using the cli, I get this error:

'create' is misspelled or not recognized by the system.

this is the command i use:

> az ml dataset create 
          -n insurance_dataset 
          --resource-group rg-name 
          --workspace-name ml-ws-name 
          -p 'file:azureml/datastore/$(az ml datastore show-default -w ml-ws-name -g rg-name --query name -o tsv)/insurance/insurance.csv'

any idea what am I doing wrong?

Dor Lugasi-Gal
  • 1,430
  • 13
  • 35
  • Have you tried upgrading `Az CLI` to the latest version? [az ml : 'ml' is misspelled or not recognized by the system](https://github.com/Azure/azure-cli/issues/21390), [How to update the Azure CLI](https://learn.microsoft.com/en-us/cli/azure/update-azure-cli) and [az ml dataset](https://learn.microsoft.com/en-us/cli/azure/ml/dataset?view=azure-cli-latest#az-ml-dataset-create:~:text=This%20reference%20is%20part%20of%20the%20ml%20extension%20for%20the%20Azure%20CLI%20(version%202.15.0%20or%20higher)) – Ecstasy Jul 25 '22 at 15:08
  • @DeepDave-MT i tried, and now i get another error Error loading command module 'serviceconnector': cannot import name 'transform_validation_result' from 'azure.cli.command_modules.serviceconnector._transformers' (C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\azure\cli\command_modules\serviceconnector\_transformers.pyc) Error loading command module 'sqlvm': No module named 'azure.cli.command_modules.sqlvm._assessment_data_source' 'create' is misspelled or not recognized by the system. – Dor Lugasi-Gal Jul 25 '22 at 16:20
  • Are these helpful? [After updating Azure CLI is broken](https://github.com/Azure/azure-cli/issues/11357), [Error loading command modules](https://github.com/Azure/azure-cli/issues/15517) and [Azure CLI ML Error - Error loading command module 'ml'](https://social.msdn.microsoft.com/Forums/en-US/3cd9250a-4fec-49ee-821a-629b75e72efe/azure-cli-ml-error-error-loading-command-module-ml?forum=MachineLearning) – Ecstasy Jul 25 '22 at 17:33

1 Answers1

4

in my case, the issue was solved by upgrading the ml extension to azure-cli-ml v2

Remove any existing installation of the of ml extension and also the CLI v1 azure-cli-ml extension:

az extension remove -n azure-cli-ml
az extension remove -n ml

Now, install the ml extension:

az extension add -n ml -y

which still doesn't explain why the create command wasn't recognized, but the v2 behavior works fine for me.

Dor Lugasi-Gal
  • 1,430
  • 13
  • 35