-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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] [macOS] Segfault in Dataset
construction with scikit-learn==1.0.0
#4632
Comments
Dataset
construction with scikit-learn==1.0.0
Dataset
construction with scikit-learn==1.0.0
Thanks for the write-up @tony-theorem , and sorry you're experiencing this! I'm very surprised that whether or not this example's code results in a segfault could be fixed by downgrading I'll try to reproduce this on my Mac tonight. We need one more piece of information...how did you install these packages? |
I am working from Python 3.9.6. My system has I created a fresh virtual environment and installed the dependencies there using
In the second case, the build was performed with |
LightGBM is incompatible with libomp 12.0 according to users' reports (#4229). Could you please try to downgrade it? |
Downgrading to As a side-note, I'm rather surprised that |
@tony-theorem I'm very glad that downgrading helped. Thanks a lot for getting back to us and reporting this! |
+1, excellent report! Thanks for all the effort you put into making a tight reproducible example. |
Thank you for everyone looking into this issue! scikit-learn 1.0 wheels for OSX was built with libomp 12 which looks to be causing the issue. We are currently working on a fix at scikit-learn/scikit-learn#21227 which uses libomp 11 for building. I tested these new wheel with the example in this PR and the segfault does not appear anymore. If everything goes smoothly the next scikit-learn bug fix release should allow you to use |
oooooo thank you very much @thomasjpfan ! |
For information, it should be possible to introspect the versions of the openmp runtime in an existing environment using:
|
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. |
Description
LightGBM segfaults during the construction of any
Dataset
when used withscikit-learn==1.0.0
on MacOS.Minimal reproducible examples are shown below. These examples result in segfaults when run with
lightgbm==3.2.1
andscikit-learn==1.0.0
on MacOS. Switching to Linux eliminates the segfaults. Downgrading toscikit-learn==0.24.2
also eliminates the segfaults.Reproducible examples
Example 1:
Small dataset which exhibits the segfault behavior.
Example 2:
Larger dataset to demonstrate that the segfault is not the result of particularly small dataset.
Environment info
MacOS environment (produces segfault):
Linux environment (no segfault):
The text was updated successfully, but these errors were encountered: