-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[python-package] Deploy a Cuda Version to Conda Forge #6657
Comments
Thanks for using LightGBM.
I'm assuming you mean the Python package (because you mentioned As described in https://github.com/microsoft/LightGBM/blob/master/python-package/README.rst#install-from-conda-forge-channel, on Linux systems with CUDA, the following will select a CUDA-enabled build of conda install -c conda-forge 'lightgbm>=4.4.0' The CUDA build isn't supported on Windows or macOS. If this doesn't answer your question, please provide more specifics about what you'd like to do and what "can be difficult" means, and we will try to help. |
I think this does answer my question. I believe the conda build automatically downloading a cuda-enabled build is new to a recent version? The last time I tried this I though the conda build did not come with a cuda-enabled version. Thanks for the answer! |
Hi. I just tried running on an A100. I got the following errors: [LightGBM] [Warning] Using sparse features with CUDA is currently not supported. [LightGBM] [Warning] Defaulting to malloc in CHAllocator!!! [LightGBM] [Fatal] [CUDA] initialization error /home/conda/feedstock_root/build_artifacts/lightgbm_1722621077976/work/src/io/cuda/cuda_column_data.cpp 16 |
You mentioned that you'd previously tried to build LightGBM from source... are you certain you've uninstalled it? pip uninstall lightgbm Can you share the output of the following commands? nvidia-smi
conda info
conda env export
python --version Are you able to provide a minimal, reproducible example that demonstrates this error? For example, is this sufficient to reproduce it? from sklearn.datasets import make_regression
import lightgbm as lgb
X, y = make_regression(n_samples=10_000)
dtrain = lgb.Dataset(X, label=y)
bst = lgb.train(
train_set=dtrain,
params={
"device": "cuda",
"objective": "regression",
"num_leaves": 7
},
num_boost_round=5
) |
Yes, I'm quite confident it's been uninstalled. This was several months ago, and I have since re-installed the conda environment.
Your program did not produce those errors. |
Ah I've figured it out! This is really embarrassing. I use python multiprocessing. When you launch launch lightgbm from a spawned process in python, it crashes cuda. I should have realized this because pytorch causes the same issues |
I have one last question for this thread, the parameter "data_sample_strategy": "goss" crashes the run in cuda mode? Is this known? I get this error: [LightGBM] [Fatal] [CUDA] invalid argument /home/conda/feedstock_root/build_artifacts/lightgbm_1722621077976/work/src/boosting/goss.hpp 63 |
Great, glad you were able to resolve that. Not embarrassing at all, please! If you can provide a minimal, reproducible example of this behavior, we'd be interested to look at it more closely.
I'm not able to reproduce that. I just spun up a Google Colab notebook with a T4 GPU and ran the following to install a CUDA-enabled version of
And then ran the minimal example from #6657 (comment), but with from sklearn.datasets import make_regression
import lightgbm as lgb
X, y = make_regression(n_samples=10_000)
dtrain = lgb.Dataset(X, label=y)
bst = lgb.train(
train_set=dtrain,
params={
"device": "cuda",
"data_sample_strategy": "goss",
"objective": "regression",
"num_leaves": 7
},
num_boost_round=5
) Training succeeded. It produced these logs:
output of 'nvidia-smi' (click me)
We're grateful for bug reports that help to improve the library, but please... try to provide the type of information you'd like someone reporting a bug to report to you. You might find these helpful, I know I have: |
This issue has been automatically closed because it has been awaiting a response for too long. When you have time to to work with the maintainers to resolve this issue, please post a new comment and it will be re-opened. If the issue has been locked for editing by the time you return to it, please open a new issue and reference this one. Thank you for taking the time to improve LightGBM! |
Hi. I’m having a lot of trouble building and deploying a CUDA version of LGBM in my conda environment. When you source everything from conda forge, it can be difficult to try to integrate a pip version of LGBM.
Would it be possible to deploy the CUDA version to conda forge?
Thanks
The text was updated successfully, but these errors were encountered: