如何对 Azure ML 服务部署进行故障排除?
How can I troubleshoot my Azure ML service deployment?
我正在尝试 Azure Machine Learning Service 将 ML 模型部署为 Web 服务。
我已经 and now would like to deploy it as web service following the guide 使用 Azure (Python) 笔记本。
步骤
service = Webservice.deploy_from_model(my-model-svc',
deployment_config=aciconfig,
models=[model],
image_config=image_config)
对我来说失败了
Creating image
Image creation operation finished for image my-model-svc:5, operation "Succeeded" Creating service
Running.
FailedACI service creation operation finished, operation
"Failed" Service creation polling reached terminal state, current
service state: Transitioning Service creation polling reached terminal
state, unexpected response received.
不确定根本原因是什么,因为(据我所知)我无法访问 Azure 门户中的部署日志。
有人可以解释一下吗?
我认为您的 init
函数出现故障。我会首先尝试将镜像创建与镜像部署隔离开来,先测试镜像:
az acr login -n <container-registry>
docker run -p 8000:5001 <container-registry>.azurecr.io/<image-name>:<image-version>
# basically, the entire image location, see pic below
- 在本地测试镜像,它监听8000端口:
POST http://localhost:8000/score
Content-Type: application/json
- 如果可行,将其部署到 ACI
<container-registry>
是与 ML 工作区关联的 Container Registry
的名称,您也可以从图像位置提取它,注意删除第一个点之后的所有内容:
作为补充回答,
service.get_logs()
如果您从没有中间 docker 图像的模型进行部署, 非常有用。
我正在尝试 Azure Machine Learning Service 将 ML 模型部署为 Web 服务。
我已经
步骤
service = Webservice.deploy_from_model(my-model-svc',
deployment_config=aciconfig,
models=[model],
image_config=image_config)
对我来说失败了
Creating image
Image creation operation finished for image my-model-svc:5, operation "Succeeded" Creating service
Running.
FailedACI service creation operation finished, operation
"Failed" Service creation polling reached terminal state, current service state: Transitioning Service creation polling reached terminal state, unexpected response received.
不确定根本原因是什么,因为(据我所知)我无法访问 Azure 门户中的部署日志。
有人可以解释一下吗?
我认为您的 init
函数出现故障。我会首先尝试将镜像创建与镜像部署隔离开来,先测试镜像:
az acr login -n <container-registry>
docker run -p 8000:5001 <container-registry>.azurecr.io/<image-name>:<image-version>
# basically, the entire image location, see pic below
- 在本地测试镜像,它监听8000端口:
POST http://localhost:8000/score
Content-Type: application/json
- 如果可行,将其部署到 ACI
<container-registry>
是与 ML 工作区关联的 Container Registry
的名称,您也可以从图像位置提取它,注意删除第一个点之后的所有内容:
作为补充回答,
service.get_logs()
如果您从没有中间 docker 图像的模型进行部署,非常有用。