问题描述:
在使用LGBM是设置GPU以及ID后 'device': 'gpu', 'gpu_platform_id': 0, 'gpu_device_id': 0,
使用出现:
LightGBMError: GPU Tree Learner was not enabled in this build.
Please recompile with CMake option -DUSE_GPU=1
解决方案:
LGBM编译有要求,最好要加上 -DUSE_GPU=1
.
git clone --recursive https://github.com/Microsoft/LightGBM
cd LightGBM && rm -rf build && mkdir build && cd build && cmake -DUSE_GPU=1 ../../LightGBM && make -j4 && cd ../python-package && python3 setup.py install --precompile --gpu;