azureyamlazure-cliazure-machine-learning-serviceazuremlsdk

azure cli not recognizing the following command az ml data create -f <file-name>.yml


got a folder called data-asset which contains a yaml file with the following

type: uri_folder
name: <name_of_data>
description: <description goes here>
path: <path>

In a pipeline am referencing this using azure cli inline script using the following command az ml data create -f .yml but getting error

full error-D:\a\1\s\ETL\data-asset>az ml data create -f data-asset.yml ERROR: 'ml' is misspelled or not recognized by the system.

Examples from AI knowledge base: az extension add --name anextension Add extension by name

trying to implement this https://learn.microsoft.com/en-us/azure/machine-learning/how-to-create-register-data-assets?tabs=CLI

how can a resolve this?


Solution

  • One of the workaround you can follow to resolve the above issue;

    Based on this GitHub issue as suggested by @adba-msft .

    Please make sure that you have upgraded your azure cli to latest and Azure CLI ML extension v2 is being used.

    To check and upgrade the cli we can use the below cmdlts:

    az version
    
    az upgrade
    

    enter image description here

    For more information please refer this similar SO THREAD|'create' is misspelled or not recognized by the system on az ml dataset create .

    I did observe the same issue after trying the aforementioned suggestion by @Dor Lugasi-Gal it works for me with (in my case az ml -h) after installed the extension with az extension add -n ml -y can able to get the result of az ml -h without any error.

    SCREENSHOT FOR REFERENCE:-

    enter image description here