有没有办法在Google Collab上导入具有GPU支持的XGBoost?最后,我昨天尝试过,加载的XGBoost不支持GPU。
您可以通过以下链接访问笔记本:https://colab.research.google.com/drive/1YxCw7eVHZDrbVBFqSN0-t1mZ-fBJJI7h
错误是: XGBoostError:b'[19:15:28] src / learner.cc:151:XGBoost版本未使用GPU支持进行编译。\ n \ n堆栈跟踪返回了10个条目:\ n [bt](0)/ usr / local / lib /python3.6/dist-packages/xgboost/./lib/libxgboost.so(_ZN4dmlc15LogMessageFatalD1Ev+0x3c)[0x7eff3d42f8ac] \ n [bt](1)/usr/local/lib/python//3.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'
答案 0 :(得分:1)
从here下载Linux版本,然后
!pip uninstall xgboost
!pip install xgboost-0.81-py2.py3-none-manylinux1_x86_64.whl
...为我工作。