Delete a Model in Azure Machine Learning using Python sdk v2

2024-09-24T11:08:28.6333333+00:00

Hello, I am upgrading my python code using Azure Machine Learning Python sdk v1 to v2, and I cannot find the way to delete models in a workspace, but it was indeed available in the old version 1. Is it possible to delete a model using the sdk v2?

Thanks

Salvador Calabria

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

1 answer

Sort by: Most helpful
  1. YutongTie-MSFT 51,716 Reputation points
    2024-09-24T22:37:17.4+00:00

    Hello @Calabria Montero, Salvador (SGRE SE D FP&DC WEF)

    Thanks for reaching out to us, I can understand you are looking for a way to delete models you don't want by Python SDK v2, however, delete method is not available in v2 at this moment as this document.

    There are alternative ways for it -

    1. Archive the model - Archiving a model hides it from list queries like az ml model list by default. You can continue to reference and use an archived model in your workflows.
    2. Delete the deployment only
    3. Create_or_update a model as you may already be aware.

    I have reached out to product team for the best practices, will let you know once I get any response.

    Regards,

    Yutong

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.