[英]Delete and list out the all models and deployment service from Azure Machine Learning Service using python
How to get all models and deployment service from Azure Machine Learning Service and how to delete it using python.如何从 Azure 机器学习服务获取所有模型和部署服务,以及如何使用 python 删除它。
Is there any way to list, delete all models and deployment services from Azure ML Service using python?有没有办法使用 python 从 Azure ML 服务中列出、删除所有模型和部署服务?
The Model Class has methods to help you accomplish this task. 模型类具有帮助您完成此任务的方法。 Check out delete and list methods.
查看删除和列表方法。
Sample code:示例代码:
from azureml.core import Workspace
ws = Workspace.get(name="your_workspace_name",
subscription_id='your_subscription_id',
resource_group='your_resource_group')
from azureml.core import Model
for model in Model.list(ws):
print('name:', model.name, '\nversion:', model.version, '\n')
Model(ws, name = 'model_name', version = 'model_version').delete()
from azureml.core import Webservice
for webservice in Webservice.list(ws):
print('name:', webservice.name)
Webservice(ws, name = 'webservice').delete()
Thanks.谢谢。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.