0

我正在关注无人驾驶的教程:Driverless AI Standalone Python Scoring Pipeline,您可以在以下链接中查看:

http://docs.h2o.ai/driverless-ai/latest-stable/docs/userguide/scoring-standalone-python.html#tar-method-py

我正在表演:

运行 Python 评分过程 - 推荐

但是,在运行最后一步时:

DRIVRLESS_AI_LICENSE_KEY = "这里粘贴密钥" SCORING_PIPELINE_INSTALL_DEPENDENCIES = 0 /path/to/your/dai-env.sh ./run_example.sh

发生以下错误:

回溯(最近一次调用最后一次):文件“example.py”,第 7 行,从scoring_h2oai_experiment_5fd7ff9c_b11a_11eb_b91f_0242ac110002 导入记分器文件“/usr/local/lib/python3.6/dist-packages/scoring_h2oai_experiment_5fd7ff9c_b11a_11,100102/init 0242.py 行在

from .scorer import Scorer   File "/usr/local/lib/python3.6/dist-packages/scoring_h2oai_experiment_5fd7ff9c_b11a_11eb_b91f_0242ac110002/scorer.py",

第 7 行,在

from h2oaicore import application_context

ModuleNotFoundError:没有名为“h2oaicore”的模块

- 希望你能帮助我,在此先感谢。

4

2 回答 2

0

我同意@BlackPhoenix 的评论。它正在寻找 h2oaicore 模块。DAI Python 评分管道附带一个 h2oaicore .whl 文件。查看 shell 脚本,run_example.sh. 它应该包含有关 pip 安装 h2oaicore 的步骤。

于 2021-05-23T01:08:29.450 回答
0

显然它没有找到你的 h20aicore 模块。导入它的一种蛮力方法可以在您的 python 脚本中执行以下操作:

import sys 
import os
sys.path.append(os.path.abspath("path/to/module"))

或者,您应该将其添加到您的 python 路径中。

于 2021-05-20T17:24:35.500 回答