首页 > 解决方案 > Web 服务部署 Azure ML

问题描述

我正在尝试部署 Keras 模型但出现错误。我的代码是

service = Webservice.deploy_from_model(workspace = ws, 
                       name = "test-classifier",
                       deployment_config = aciconfig,
                       models = [model],
                       image_config = image_config)
service.wait_for_deployment(show_output = True)

错误:

{
  "code": "GatewayTimeout",
  "statusCode": 504,
  "message": "ACI Service request failed. Reason: The gateway did not receive a response from 'Microsoft.ContainerInstance' within the specified time period.."
}

为什么我会收到此错误?

标签: azuremachine-learningazure-machine-learning-service

解决方案


默认超时时间为 1 分钟。您可以通过修改 score.py 来增加超时时间或尝试加快服务速度,以去除不必要的调用。如果这些操作不能解决问题,请使用本文中的信息来调试 score.py 文件。代码可能处于无响应状态或无限循环。


推荐阅读