Skip to content
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

[Question] LightGBM GPU version for setuptools #4653

Closed
bingoko opened this issue Oct 6, 2021 · 8 comments
Closed

[Question] LightGBM GPU version for setuptools #4653

bingoko opened this issue Oct 6, 2021 · 8 comments
Labels

Comments

@bingoko
Copy link

bingoko commented Oct 6, 2021

Hi,

I would like to include "lightgbm --install-options=--gpu" in the install_requires in setup.py for building wheel.
However, install_requires argument doesn't allow --install-option.

Any solution to that?

@StrikerRUS
Copy link
Collaborator

@bingoko Hi! Could you please provide more details? Are you writing your own package and would like to include LightGBM GPU version as a requirement for that package?

@bingoko
Copy link
Author

bingoko commented Oct 7, 2021

Yes, this is what exactly I want to do.

@bingoko Hi! Could you please provide more details? Are you writing your own package and would like to include LightGBM GPU version as a requirement for that package?

@StrikerRUS
Copy link
Collaborator

Looks like it is indeed impossible to use additional options for dependencies directly in the setup.py file. But it's possible to specify

lightgbm --install-option="--gpu"

in the requirements.txt file for your project.

https://pip.pypa.io/en/stable/cli/pip_install/#per-requirement-overrides

@StrikerRUS
Copy link
Collaborator

Also, here is a hacky workaround: https://stackoverflow.com/a/37283903.

@bingoko
Copy link
Author

bingoko commented Oct 8, 2021

Thanks.

Is it possible to compile GPU/CUDA version of LightGBM by using an integerated name? I.e., LightGBM-CUDA which make the thing easier.

Looks like it is indeed impossible to use additional options for dependencies directly in the setup.py file. But it's possible to specify

lightgbm --install-option="--gpu"

in the requirements.txt file for your project.

https://pip.pypa.io/en/stable/cli/pip_install/#per-requirement-overrides

@StrikerRUS
Copy link
Collaborator

StrikerRUS commented Oct 8, 2021

We thought about preparing a separate PyPI project with LightGBM GPU version: #2263. But then @tpboudreau and @itamarst made awesome contribution that allowed ordinary Windows wheels to be used for training on GPU (#3144). For non-Windows wheels GPU training is not implemented yet though.

@StrikerRUS
Copy link
Collaborator

I'm going to close this issue as the original feature request should be redirected to the setuptools project.

If you have any further suggestions for lightgbm-gpu package, please feel free to share them in #2263.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants