azureazure-cliazure-machine-learning-serviceazuremlsdk

'create' is misspelled or not recognized by the system on az ml dataset create


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?


Solution

  • 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.