【问题标题】:Error when deploying autoML StackEnsemble model in Azure ML Workspace在 Azure ML 工作区中部署 autoML StackEnsemble 模型时出错
【发布时间】:2019-08-07 15:12:12
【问题描述】:

我有一个使用 Azure ML 工作区的 autoML 功能训练的 StackEnsemble 模型。当我尝试将其部署为 Web 服务时,出现如下错误 (CrashLoopBackOff)。 现在,我强烈怀疑它与模型本身/它需要的依赖关系有关。当我将 score.py 中的模型名称交换为另一个模型名称时,它不是 StackEnsemble(带有缩放器)而只是普通的 XGBoost,然后创建的服务没有问题。

我有以下问题: - 我如何找出 StackEnsemble 中的模型/算法,以便正确构建容器/依赖项列表? - 有没有办法找出那里的实际错误?我的意思是除了创建我的本地容器并在那里调试它...... 我尝试根据文档使用 service.get_logs() 获取日志,但那里什么都没有,只有最后 5 行没有指出任何问题。

请指教。

WebserviceException: Service deployment polling reached non-successful terminal state, current service state: Failed
Error:
{
  "code": "AciDeploymentFailed",
  "message": "Aci Deployment failed with exception: Your container application crashed. This may be caused by errors in your scoring file's init() function.\nPlease check the logs for your container instance: classifier-bwp-ls5923-v1. From the AML SDK, you can run print(service.get_logs()) if you have service object to fetch the logs. \nYou can also try to run image mlws219f9669.azurecr.io/classifier-bwp-ls5923-v1:4 locally. Please refer to http://aka.ms/debugimage#service-launch-fails for more information.",
  "details": [
    {
      "code": "CrashLoopBackOff",
      "message": "Your container application crashed. This may be caused by errors in your scoring file's init() function.\nPlease check the logs for your container instance: classifier-bwp-ls5923-v1. From the AML SDK, you can run print(service.get_logs()) if you have service object to fetch the logs. \nYou can also try to run image mlws219f9669.azurecr.io/classifier-bwp-ls5923-v1:4 locally. Please refer to http://aka.ms/debugimage#service-launch-fails for more information."
    }
  ]
}

【问题讨论】:

    标签: azure automl azure-machine-learning-service


    【解决方案1】:

    我不确定如何让模型在 Ensemble 中使用,但在此期间您可以尝试其他一些事情来减轻自己的负担。

    当您的服务卡在 CrashLoopBackoff 中时,它会不断重新启动,这意味着日志将不断被擦除,因为它们存储在容器本身上。此处的快速解决方法是多次运行 get_logs() 函数以查看发生的所有情况。

    要获取历史信息,请确保在 InferenceConfig 中设置了 appInsightsEnabled,以便您可以跟踪附加到工作区的 AppInsights 中的日志。

    除了依赖项不匹配之外,CrashLoopBackoff 最常见的原因是服务没有获得足够的内存来实际加载并针对模型进行评分。尝试增加服务的内存预留。

    【讨论】:

    • 问题是我必须将 pip azureml-sdk[automl] 添加到之前不存在的 myenv.yml 中。感谢您对 appInsightsEnabledm 内存的提示 - 这很重要,因为我的目标是在该容器上部署多个 web 服务,所以我想节省成本,让它们各自相对较低的 cpu/内存,并定期打印 get_logs( )。
    猜你喜欢
    • 2018-06-20
    • 1970-01-01
    • 1970-01-01
    • 2022-10-13
    • 2022-08-25
    • 2020-07-20
    • 2021-12-13
    • 1970-01-01
    • 2019-11-21
    相关资源
    最近更新 更多