简体   繁体   中英

XGBoost with GPU support on Google Colab

Is there a way to import the XGBoost with GPU support on Google Collab? At last, I tried yesterday and the loaded XGBoost does not have the GPU support.

You could reach the notebook from this link: https://colab.research.google.com/drive/1YxCw7eVHZDrbVBFqSN0-t1mZ-fBJJI7h

And the error is:

XGBoostError: b'[19:15:28] src/learner.cc:151: XGBoost version not compiled with GPU support.\\n\\nStack trace returned 10 entries:\\n[bt] (0) /usr/local/lib/python3.6/dist-packages/xgboost/./lib/libxgboost.so(_ZN4dmlc15LogMessageFatalD1Ev+0x3c) [0x7eff3d42f8ac]\\n[bt] (1) /usr/local/lib/python3.6/dist-packages/xgboost/./lib/libxgboost.so(_ZN7xgboost11LearnerImpl17ConfigureUpdatersEv+0x2a1) [0x7eff3d439561]\\n[bt] (2) /usr/local/lib/python3.6/dist-packages/xgboost/./lib/libxgboost.so(_ZN7xgboost11LearnerImpl9ConfigureERKSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_ESaIS9_EE+0x35b) [0x7eff3d43ba2b]\\n[bt] (3) /usr/local/lib/python3.6/dist-packages/xgboost/./lib/libxgboost.so(XGBoosterUpdateOneIter+0x47) [0x7eff3d59cdc7]\\n[bt] (4) /usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call_unix64+0x4c) [0x7eff5dd19e18]\\n[bt] (5) /usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call+0x32a) [0x7eff5dd1987a]\\n[bt] (6) /usr/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so( _ctypes_callproc+0x4cd) [0x7eff5df2d96d]\\n[bt] (7) /usr/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so(+0x8727) [0x7eff5df24727]\\n[bt] (8) /usr/bin/python3(_PyObject_FastCallDict+0xa3) [0x459893]\\n[bt] (9) /usr/bin/python3() [0x54f117]\\n'

Download the Linux version from here , and then

!pip uninstall xgboost
!pip install xgboost-0.81-py2.py3-none-manylinux1_x86_64.whl

...is working for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM