在Azure笔记本中使用远程Azure自动机器学习模型时发生导入错误



我在Azure ML计算集群上训练了一个自动机器学习模型。

我正在尝试在我的Azure托管的Jupyter笔记本中使用该远程模型。

这是工作簿中试图加载远程模型的代码:

remote_run = AutoMLRun(experiment = experiment, run_id = '... Experiment id ...')
remote_best_run, remote_fitted_model = remote_run.get_output()

此代码失败,并出现以下错误:

ModuleNotFoundError Traceback(最近调用最后(2#remote_run.wait_for_completion(show_output=True(3只进口熊猫作为pd---->4 remote_best_run,remote_fitted_model=remote_run.get_output((5#!pip列表

~/anaconda3_501/lib/python3.6/site-packages/azureml/train/automl/run.py在get_output(self、迭代、metric(中406407,打开(model_local,"rb"(作为model_file:-->408 fitted_model=pickle.load(model_file(409返回电流run,fitted_model410

ModuleNotFoundError:没有名为'pandas的模块_libs.tslibs.timestamps的

可能Azure ML计算集群上安装的内容与Jupyter笔记本内核中安装的内容存在版本差异,或者我缺少一个包。

如何使此远程模型工作?

为了获得更多参考,我遵循本教程:https://notebooks.azure.com/NileshA/projects/GlobalAI

注意1我也可以通过在jupyter笔记本中运行以下代码来重现此错误:

import pickle
with open('model.pkl', 'rb') as p_f:
data = pickle.load(p_f)

我给Auto ML帮助台发了电子邮件,他们解决了这个问题。

他们的报价:

我们有一个错误,AutoML推理失败,因为Panda版本是0.22.0,不支持API。

我将托管笔记本上的panda升级到0.23.4版本,之后该模型解锁并成功运行

最新更新