microsoft / LightGBM

A fast, distributed, high performance gradient boosting (GBT, GBDT, GBRT, GBM or MART) framework based on decision tree algorithms, used for ranking, classification and many other machine learning tasks.
https://lightgbm.readthedocs.io/en/latest/
MIT License
16.72k stars 3.84k forks source link

[GPU] LightGBMError: bin size 3142 cannot run on GPU #6702

Open crs1910 opened 4 weeks ago

crs1910 commented 4 weeks ago

Description

Hi, I encountered an error which has been posted by many people while training a LightGBM model using the GPU: LightGBMError: bin size 3142 cannot run on GPU. This error seems to be related to the max_bin parameter setting. I tried reducing the bin size, but it has not resolved the issue.Just wanted to know if there is any fix for this or how I can train lgb model with categorical features having large number of categories.

Reproducible example


params = {
    'boosting_type': 'gbdt',
    'objective': 'binary',
    'metric': 'binary_logloss',
    'device': 'gpu',
    'max_bin': 200, 
    'num_leaves': 31
}

train_data = lgb.Dataset(X_train, label=y_train)
model = lgb.train(params, train_data)

Environment info

lgb version : 4.5.0 cuda version : 11.8 Python 3.7.13

Thanks in advance.

crs1910 commented 2 weeks ago

Hi team, just a gentle reminder.Any update on this ?

yuhorun commented 5 days ago

我也有碰到了这个问题,正在寻求解决办法。

yuhorun commented 5 days ago

@crs1910 I've also encountered this issue. It seems there is a solution in this pull request, but I don't know how to try it out. If you succeed, could you please let me know how to do it?

https://github.com/microsoft/LightGBM/pull/6019:https://github.com/microsoft/LightGBM/pull/6019