Xtra-Computing / thundergbm

ThunderGBM: Fast GBDTs and Random Forests on GPUs
Apache License 2.0
695 stars 88 forks source link

RuntimeError: Please build the library first! #50

Open Weidong725 opened 3 years ago

Weidong725 commented 3 years ago

After win10 system is successfully installed through. whl file.The following error occurred during import:

RuntimeError Traceback (most recent call last)

in ----> 1 import thundergbm E:\Anaconda\envs\tf\lib\site-packages\thundergbm\__init__.py in 8 """ 9 name = "thundergbm" ---> 10 from .thundergbm import * E:\Anaconda\envs\tf\lib\site-packages\thundergbm\thundergbm.py in 32 thundergbm = CDLL(lib_path) 33 else: ---> 34 raise RuntimeError("Please build the library first!") 35 36 OBJECTIVE_TYPE = ['reg:linear', 'reg:logistic', 'binary:logistic', RuntimeError: Please build the library first!
zeyiwen commented 3 years ago

You have the issue, possibly because of #49. Please try to build the .whl file on your own. Our team is very busy recently due to several paper deadlines, and will look into the issues at a later stage.

Kunjal1999 commented 3 years ago

You have the issue, possibly because of #49. Please try to build the .whl file on your own. Our team is very busy recently due to several paper deadlines, and will look into the issues at a later stage.

I am facing the same issue after git cloning, building and pip installing thundergbm on linux. Whenever I run from thundergbm import *, I face the same error.

When I run mkdir build && cd build && cmake .. && make -j

I face:

CMakeFiles/Makefile2:168: recipe for target 'src/thundergbm/CMakeFiles/thundergbm.dir/all' failed make[1]: [src/thundergbm/CMakeFiles/thundergbm.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: [all] Error 2

Kurt-Liuhf commented 3 years ago

Hi @Kunjal1999, thanks for the comments.

You couldn't import the library because you haven't built the library successfully. So you should check the library building process. Here are some suggestions that might help.

Thanks.

Kunjal1999 commented 3 years ago

Hi @Kunjal1999, thanks for the comments.

You couldn't import the library because you haven't built the library successfully. So you should check the library building process. Here are some suggestions that might help.

  • Refer to the document as @zeyiwen mentioned.Make sure to initialize and update the submodules.
  • Check the version of CUDA. If you are using CUDA > 11.0, you need to clone the support_cuda_11 branch.
  • We couldn't reproduce your result on a Unbuntu 16.0.4 with CUDA 11.0. So introducing your system configurations and uploading the entire error stack will be more appreciated.

Thanks.

Hey, thanks for the reply, I was running the commands on Google Colab. CUDA:

nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2020 NVIDIA Corporation Built on Wed_Jul_22_19:09:09_PDT_2020 Cuda compilation tools, release 11.0, V11.0.221 Build cuda_11.0_bu.TC445_37.28845127_0

Kurt-Liuhf commented 3 years ago

Some bash commands to install ThunderGBM on Colab: # clone and init submodules !git clone -b support_cuda11 https://github.com/Xtra-Computing/thundergbm !cd thundergbm && git submodule init && git submodule update && mkdir build # build the library !cd thundergbm/build && cmake .. && make -j 10 # test if built successfully !cd thundergbm/build && ./bin/thundergbm-train data=../dataset/test_dataset.txt # build wheel file and install it with pip # clear the dist dir !cd thundergbm/python && ls dist && rm -rf dist/* && ls dist # generate the wheel file and install !cd thundergbm/python && ls && python setup.py bdist_wheel && cd dist && ls && pip install `ls`