Skip to content

[python-package] Using sparse features with CUDA is currently not supported. #6631

Closed
@OrangeAoo

Description

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions