【问题标题】:Selecting a model by name using Webservice.list on AzureML在 AzureML 上使用 Webservice.list 按名称选择模型
【发布时间】:2021-03-17 09:53:36
【问题描述】:

我在 Azure 上部署了一个 huggingface ML 模型,现在我尝试使用 Python SDK 选择它。

我正在尝试这个:

from azureml.core import Workspace, Webservice
mlw = Workspace.from_config("mlw.json")
services = Webservice.list(mlw)
services_filtered = Webservice.list(mlw, model_name=services[0].name)

现在,services 是一个包含两个模型的列表,但 services_filtered 是一个空列表。我在这里做错了什么?

当然,之后我可以使用名称选择正确的,但这似乎不正确。

【问题讨论】:

    标签: python azure api azureml


    【解决方案1】:

    已经想通了。服务的名称与模型的名称不同。使用它时,它确实有效:

    services_filtered = Webservice.list(mlw, model_name=services[0].models[0].name)
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-03-12
      • 2013-11-29
      • 1970-01-01
      • 2011-11-27
      • 2015-12-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多