首页 文章

H2O:可以't done run_tcp_client.sh (example_client.py) with DriverlessAI' s得分手.zip

提问于
浏览
0

我正在使用DriverlessAI(使用H2O.ai)并尝试使用记分器(这是一个由DriverlessAI制作的诊断模型),但是发生了错误 .

运行run_tcp_client.sh时,错误“文件”example_client.py“,第5行,来自thrift import Thrift ModuleNotFoundError:没有名为'thrift'的模块” .

在文档(https://www.h2o.ai/wp-content/uploads/2017/09/driverlessai/scoring-package.html)中写道,在运行run_tcp_server.sh之后运行run_tcp_client.sh就足够了 .

我该怎么办?

1 回答

  • 0

    您需要按照链接的documentation安装Thrift:

    The following are required in order to run the scoring package. [..] Apache Thrift (to run the TCP scoring service)

    安装Thrift Thrift需要在TCP模式下运行评分服务,但不需要运行评分模块 . Thrift文档站点上提供了以下步骤:https://thrift.apache.org/docs/BuildingFromSource .

    $ sudo apt-get install automake bison flex g++ git libevent-dev \
      libssl-dev libtool make pkg-config libboost-all-dev ant
    $ wget https://github.com/apache/thrift/archive/0.10.0.tar.gz
    $ tar -xvf 0.10.0.tar.gz
    $ cd thrift-0.10.0
    $ ./bootstrap.sh
    $ ./configure
    $ make
    $ sudo make install
    

    @编辑:

    请检查您是否可以运行(在您拥有这些脚本的文件夹中):

    $ source client_env/bin/activate
    $ python -c 'from thrift.transport import TSocket'
    

    如果您得到相同的例外,请运行:

    pip install -r client_requirements.txt
    

    并尝试再次运行脚本 .

相关问题