简体   繁体   English

尝试部署模型时 Azure 机器学习失败

[英]Azure Machine learning fails when trying to deploy model

I'm currently trying to deploy a model on azure and expose it's endpoint to my application but I kept running into errors我目前正在尝试在 azure 上部署一个模型并将它的端点公开给我的应用程序,但我一直遇到错误

DEPLOYMENT CODE部署代码

model = run.register_model(model_name='pytorch-modeloldage', model_path="outputs/model") print("Starting.........")

inference_config = InferenceConfig(runtime= "python", 
                                   entry_script="pytorchscore.py",
                                   conda_file="myenv.yml")

aciconfig = AciWebservice.deploy_configuration(cpu_cores=1,auth_enabled=True,
                                               memory_gb=1, 
                                               tags={'name':'oldageml', 'framework': 'pytorch'},
                                               description='oldageml training')

service = Model.deploy(workspace=ws, 
                           name='pytorch-olageml-run', 
                           models=[model], 
                           inference_config=inference_config,
                           overwrite=True,
                           deployment_config=aciconfig)

service.wait_for_deployment(True)
# print(service.get_logs()) print("bruh did you run", service.scoring_uri) print(service.state)

ERROR错误

ERROR - Service deployment polling reached non-successful terminal state, current service state: Transitioning
More information can be found here: 
Error:
{
  "code": "EnvironmentBuildFailed",
  "statusCode": 400,
  "message": "Failed Building the Environment."
}

I had this error, too, and I was convinced it was working a few days ago!我也有这个错误,几天前我确信它可以正常工作! Anyway, I realised that I was using python 3.5 in my environment definition.无论如何,我意识到我在我的环境定义中使用了 python 3.5。 I changed that to 3.6 and it works!我将其更改为 3.6 并且它有效! I notice that there was a new release of azureml-code on 9 Dec 2019.我注意到 2019 年 12 月 9 日发布了新版本的 azureml-code。

This is my code for changing the environment;这是我改变环境的代码; I add the environment for a variable rather than a file as you do, so that's a bit different.我像你一样为变量而不是文件添加环境,所以这有点不同。

myenv=Environment(name="env-keras")
conda_packages = ['numpy']
pip_packages = ['tensorflow==2.0.0', 'keras==2.3.1', 'azureml-sdk','azureml-defaults']
mycondaenv = CondaDependencies.create(conda_packages=conda_packages, pip_packages=pip_packages, python_version='3.6.2')
myenv.python.conda_dependencies=mycondaenv
myenv.register(workspace=ws)

inference_config = InferenceConfig(entry_script='score.py',source_directory='.',environment=myenv)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 部署端点 model Azure 机器学习失败 - Failed deploy endpoint model Azure Machine Learning 如何将现有机器学习模型与 Azure 机器学习结合使用? - How to use an existing machine learning model with Azure Machine Learning? 使用Azure机器学习服务训练大型模型时如何克服TrainingException? - How to overcome TrainingException when training a large model with Azure Machine Learning service? Azure机器学习建议API:删除生成失败 - Azure Machine Learning Recommendations API: Delete Build fails Azure机器学习端点SQL Access失败,可以在实验中运行 - Azure Machine Learning Endpoint SQL Access fails, works in experiement 在 Windows 10 上安装 Azure 机器学习工作台失败 - Installation of Azure Machine Learning Workbench fails on Windows 10 如何将机器学习模型 pickle 存储到 azure blob 并检索它/ - How to store the machine learning model pickle to azure blob and retrieve it/ 将 R(本地)中保存的 ML 模型上传到 Azure 机器学习工作室 - Upload Saved ML Model in R (local) to Azure Machine Learning Studio 无法在Azure机器学习服务工作区中注册ONNX模型 - Unable to register an ONNX model in azure machine learning service workspace Model 部署到 Azure 机器学习中 VNet 内的托管在线端点 - Model deployment to managed online endpoints inside VNet in Azure Machine Learning
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM