azure cli ml commands should be idempotent

Neil McAlister 266 Reputation points
2022-12-20T13:23:18.663+00:00

Commands run from the Azure CLI ML extension should really be idempotent where required.

For example this command when run twice...

az ml online-endpoint create -n my-endpoint -f .\my-endpoint.yml --resource-group my-rg --workspace-name my-aml

...second time of asking...

(UserError) An endpoint with this name already exists. If you are trying to create a new endpoint, use a  
different name. If you are trying to update an existing endpoint, use `az ml online-endpoint update` instead.  

Creating CI/CD pipelines for this is hard - constantly writing scaffolding scripts around enumerating though what already exists and working around the issue it isn't really the done thing now. Please consider changing some of these ML cmdlets with this in mind please - Thanks

https://learn.microsoft.com/en-us/cli/azure/ml/online-deployment?view=azure-cli-latest#az-ml-online-deployment-create

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
2,715 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ramr-msft 17,731 Reputation points
    2022-12-21T04:26:43.88+00:00

    @Neil McAlister Thanks for the feedback. We have created a backlog item to update the document for online deployment.

    1 person found this answer helpful.
    0 comments No comments