在Azureml中执行脚本时发生错误0085(错误仅在Excel或API上发生,在实验中不发生) [英] Error 0085 while executing script in Azureml (Error only occurs on Excel or API, not in Experiment)

查看:101
本文介绍了在Azureml中执行脚本时发生错误0085(错误仅在Excel或API上发生,在实验中不发生)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我遇到了一个问题,我的实验有两个模型.

I got a issue, my experiment has two models.

它在实验"中可以完美运行,但是当我部署到Web服务时,会收到此错误.

It works perfect on Experimentation, but when I deploy to web service I receive this error.



  • 错误! {错误":{代码":"ModuleExecutionError",消息":模块执行遇到错误."详细信息":[{代码":"85",目标":执行 Python脚本RRS",消息":错误0085:在脚本评估期间发生以下错误,请查看输出日志以获取更多信息:\ r \ n ----------错误消息的开始来自Python解释器---------- \ r \ n 执行函数时:回溯(最近一次调用最近):\ n executeScript中的文件\"\\ server \\ InvokePy.py \",行120 \ n outframe = mod.azureml_main(* inframes)\ n File \ "\\ temp \\ 8886879295127076603.py \",第40行,在azureml_main \ n模型中 = joblib.load(\"Script Bundle/modelquarter.sav \")\ n文件\"C:\\ pyhome \\ lib \\ site-packages \\ sklearn \\ externals \\ joblib \\ numpy_pickle. py \,第443行,在load \ n中,以open_(filename,'rb')作为file_handle:\ nFileNotFoundError:[Errno 2] 文件或目录:'Script Bundle/modelquarter.sav'\ n \ r \ n \ r \ n ----------来自Python解释器的错误消息结束----------";}]}}
  • Error! {"error":{"code":"ModuleExecutionError","message":"Module execution encountered an error.","details":[{"code":"85","target":"Execute Python Script RRS","message":"Error 0085: The following error occurred during script evaluation, please view the output log for more information:\r\n---------- Start of error message from Python interpreter ----------\r\nCaught exception while executing function: Traceback (most recent call last):\n File \"\\server\\InvokePy.py\", line 120, in executeScript\n outframe = mod.azureml_main(*inframes)\n File \"\\temp\\8886879295127076603.py\", line 40, in azureml_main\n model = joblib.load(\"Script Bundle/modelquarter.sav\")\n File \"C:\\pyhome\\lib\\site-packages\\sklearn\\externals\\joblib\\numpy_pickle.py\", line 443, in load\n with open(filename, 'rb') as file_handle:\nFileNotFoundError: [Errno 2] No such file or directory: 'Script Bundle/modelquarter.sav'\n\r\n\r\n---------- End of error message from Python interpreter ----------"}]}}

两个模型都被读为: 

Both models are being reads as : 

  1. sys.path.insert(0,.\ Script Bundle")
    model = joblib.load("Script Bundle/model_quarter.sav")
  1. sys.path.insert(0,".\Script Bundle")
    model = joblib.load("Script Bundle/model_quarter.sav")

请提出任何建议.

ps:只有第一个模型,我才能在没有错误的情况下进行部署和运行.

推荐答案

文件夹Script Bundle是否与python代码位于同一文件夹中?

Is the folder Script Bundle within the same folder as your python code?

您使用的是相对路径,这意味着程序在工作目录中查找文件.错误告诉您工作目录中没有该名称的文件.

You are using a relative path, which means that the program looks for the file in the working directory. The error is telling you that there is no file of that name in the working directory.



这篇关于在Azureml中执行脚本时发生错误0085(错误仅在Excel或API上发生,在实验中不发生)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆