【发布时间】:2020-12-02 07:29:19
【问题描述】:
我正在尝试从过去 3 天开始在我的 MacOS Mojave(10.14.6) 上安装集成了 GPU 支持的 xgboost,但是没有成功。我尝试了两种方法:
- pip install xgboost
xgboost 已安装在此处,并且无需 GPU 选项(即无需 tree_method='gpu_hist')即可成功运行。
我想通过在树参数中提供“tree_method='gpu_hist'”来使用 gpu_hist 运行。当我在树参数中给出“tree_method='gpu_hist'”时,出现以下错误:
XGBoostError: [12:10:34] /Users/travis/build/dmlc/xgboost/src/gbm/../common/common.h:153: XGBoost version not compiled with GPU support.
Stack trace:
[bt] (0) 1 libxgboost.dylib 0x000000012256ba60 dmlc::LogMessageFatal::~LogMessageFatal() + 112
[bt] (1) 2 libxgboost.dylib 0x00000001225f92b3 xgboost::gbm::GBTree::ConfigureUpdaters() + 531
[bt] (2) 3 libxgboost.dylib 0x00000001225f8b97 xgboost::gbm::GBTree::Configure(std::__1::vector<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > > > > const&) + 967
[bt] (3) 4 libxgboost.dylib 0x0000000122611a0c xgboost::LearnerConfiguration::Configure() + 1500
[bt] (4) 5 libxgboost.dylib 0x0000000122611e68 xgboost::LearnerImpl::UpdateOneIter(int, std::__1::shared_ptr) + 120
[bt] (5) 6 libxgboost.dylib 0x000000012256331d XGBoosterUpdateOneIter + 157
[bt] (6) 7 libffi.7.dylib 0x0000000102102ead ffi_call_unix64 + 85
[bt] (7) 8 ??? 0x00007ffeee291da0 0x0 + 140732894092704
-
我的第二种方法:
git clone --recursive https://github.com/dmlc/xgboost cd xgboost/ 使-j4 cd python 包 python3 setup.py 安装
虽然它安装了 xgboost,但在运行此语句时会引发以下错误: dtrain=xgb.DMatrix(df_train_features,label=df_train_label)#,missing=-999)
AttributeError: dlsym(0x7ffe9aed62f0, XGDMatrixSetDenseInfo): 找不到符号
任何帮助将不胜感激
【问题讨论】: