-
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
LightGBM stuck on fitting with libomp 15.0.7 on new Apple M2 if n_jobs != 1 #5764
Comments
Thanks for using LightGBM. Can you please be more specific about what "doesn't work" means? Do you get an exception, process crash, something else? Are there any logs you can report? |
Hi, sorry for not being more clear: If i omit the n_jobs=1, it will hang indefinitely on the fit line, and I have to sigkill it. When running lightgbm as part of a pytest test suite, I sometimes get a python segmentation fault around the time the LGBM fit occurs. |
It's ok. In the future, please provide all the information asked for in the issue template. How did you install LightGBM? Please be as specific as possible. |
Some more info; it seems to get stuck here when constructing a booster (from hyperopt): Setting OMP_NUM_THREADS=1 fixes (both) issues. |
Old somewhat related thread: #4229 Downgrading libomp via homebrew is impossible, as older libomp versions are not compatible with M2. |
Issue still persists with libomp 16.0.2 |
Facing same problem -- I have to set I originally use homebrew to install lightgbm but switched to the build from github (here) due to the error, before I found this thread and setting I can only suspect the homebrew installation will also work with this workaround (haven't tested it) |
@Zahlii we just released LightGBM v4.4.0, with some fixes to macOS support. Could you please check again and see if that resolves the issue? pip install 'lightgbm>=4.4.0' I just ran the example you provided and it worked well for me.
|
@jameslamb the problem is not fixed for me.
My system is almost exactly as yours (M2 and everything) |
sad 😭 ok thank you for letting us know, we'll try to investigate soon |
Darwin PC0455 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:39:46 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6020 arm64
Name: lightgbm
Version: 3.3.5
==> libomp: stable 15.0.7 (bottled) [keg-only]
MacOs Ventura 13.2.1
The text was updated successfully, but these errors were encountered: