azuremachine-learningazure-machine-learning-service

Unable to create an Azure Machine Learning Workspace using the CLI


I am currently trying to create an azure Machine Learning workspace with the CLI. I used the code:

az ml workspace create --name "rg-dp100-labs" --resource-group "rg-dp100-labs"

I got the following error.

Code: ValidationError
Message: Missing dependent resources in workspace json
Target: workspace
Exception Details: (Invalid) Missing dependent resources in workspace json
Code: Invalid    
Message: Missing dependent resources in workspace json    
Target: workspace

Only the KeyVault and Storage accounts were created. Referring to this link on Microsoft Learn, I found that others also have the same issue. Even a Google search gave me the same code as written above. lease, is anyone experiencing the same issue and has solved it? I think it is a recent problem.


Solution

  • Yes, it seems to be a general issue with the extension ml in version 2.26.0. I solved it by running these commands one by one in a local bash:

    az extension remove -n azure-cli-ml
    az extension remove -n ml
    az extension add -n ml --version=2.25.0
    

    After running these commands, you can run the commands to provision the resource group (don't use the same group name you used previously, use a new one) and the ml workspace:

    az group create --name "new-group-name" --location "eastus"
    az ml workspace create --name "mlw-dp100-labs" -g "new-group-name"
    

    Remember to do it in a local bash, because the Cloud Shell in Azure does not allow modifying the version of ml. Here a screenshot that it works Creating a ML Workspace