我正在尝试Azure Machine Learning Service将 ML 模型部署为 Web 服务。
我已经registered a model现在想将其部署为 guide 之后的 Web 服务使用 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>
是 Container Registry
的名称与 ML 工作区关联,您还可以从图像位置提取它,注意删除第一个点之后的所有内容:
关于python - 如何排查 Azure ML 服务部署问题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55285043/