[python-package] Using sparse features with CUDA is currently not supported. #6631
Closed
Description
opened on Aug 30, 2024
Description
I got the following warnings when setting device_type='cuda'
[Warning] Using sparse features with CUDA is currently not supported.
[Fatal] CUDA Tree Learner was not enabled in this build.
Please recompile with CMake option -DUSE_CUDA=1
Reproducible example
## Train-test split
# X_train.shape==(18840083, 3), y_train.shape==(18840083,1)
# X_val.shape==(2379462, 3), y_val.shape==(2379462, 1)
## parameters
params = {
'learning_rate': 0.01,
'metric':'mse',
'max_bin':63,
'max_depth':15,
'num_leaves':10000,
'gpu_use_dp':True,
'n_estimators':750,
'tree_type':'data_parallel',
'device_type':'cuda',
'n_jobs':-1,
'verbose':1
}
## Train
start=time.time()
LGBmodel = lgb.LGBMRegressor(**params)
LGBmodel.fit(X_train,y_train,eval_set=[(X_val,y_val)])
print(f"Training LGBoost completed in {time.time()-start:.4f} seconds!")
Activity