Comments (12)
Hi James, I am sorry , I did not notice your second method post before my last post.
I have tried both methods for both python 3.11.7 and python 3.11.8, these cases all work well.
And the reinstalled lightgbm under my ray env under which I run "pip install -U lightgbm-ray" works well too.
from lightgbm.
Thanks for using LightGBM.
What version of lightgbm
do you have and how did you install it?
from lightgbm.
I installed the lightgbm-ray 0.1.9 python package which installed lightgbm 4.3.0.
from lightgbm.
Can you please share the model file that you mentioned here: ray-project/ray#44566 (comment)
from lightgbm.
from lightgbm.
Thanks. We're going to need more information to help you with this.
In ray-project/ray#44566 (comment), you claimed that code like this...
from lightgbm import Booster
booster = Booster(model_file="model.txt")
... "fails". I ran that today on my M2 Mac, with the model file you provided, using Python 3.11 and lightgbm
4.3.0, and did not see it fail.
conda create \
-c conda-forge \
--name lgb-test \
python=3.11 lightgbm=4.3.0
source activate lgb-test
Can you please share the specific commands you used to install lightgbm
? e.g. pip install
, conda install
, something else?
Can you try installing the conda
package from conda-forge as I showed above and tell us if it fixes the issue?
from lightgbm.
pip install -U lightgbm-ray
from lightgbm.
Ok, are you willing to try conda
as in my example above?
If not and you want to stay with pip
, can you please try replacing your installation of lightgbm
with one that doesn't use OpenMP? We have some known issues with OpenMP support on macOS that are still a work in progress (e.g. #4229).
pip uninstall --yes lightgbm
pip install \
--no-binary lightgbm \
--no-cache \
--config-settings=cmake.define.USE_OPENMP=OFF \
'lightgbm>=4.3.0'
Please let me know what happens if you try either of those.
Please provide as much information as possible, and if you have not seen it before please read https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax to help with formatting messages to make the difference between code, text produced by code, and your own words clearer.
from lightgbm.
(base) guxiaobo@guxiaobodebijibendiannao Downloads % python
Python 3.11.7 (main, Dec 15 2023, 12:09:56) [Clang 14.0.6 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
from lightgbm import Booster
booster = Booster(model_file="model.txt")
zsh: segmentation fault python
(base) guxiaobo@guxiaobodebijibendiannao Downloads %
Python 3.11.8 works fine, it seems a Python version related problem.
from lightgbm.
I asked you to try 2 different installation methods for lightgbm
... is this message you just posted the result of trying one of those? If so... which one? And did you try the other one?
We're happy to try to help, but please answer our direct questions.
from lightgbm.
(base) guxiaobo@guxiaobodebijibendiannao Downloads % python Python 3.11.7 (main, Dec 15 2023, 12:09:56) [Clang 14.0.6 ] on darwin Type "help", "copyright", "credits" or "license" for more information.
from lightgbm import Booster
booster = Booster(model_file="model.txt")
zsh: segmentation fault python
(base) guxiaobo@guxiaobodebijibendiannao Downloads %Python 3.11.8 works fine, it seems a Python version related problem.
This output is in the ray env which lightgbm is installed by "pip install -U lightgbm-ray"
from lightgbm.
No problem!
all works well
Ok great! Then yes I strongly suspect this is related to OpenMP compatibility issues. Until you see that #4229 is closed, I recommend using the lightgbm
package from conda-forge
on the M3 Mac.
Very sorry for the difficulty. macOS packaging is an area I'm focusing on for the next release of LightGBM, hopefully this will get better soon. You can subscribe to #4229 to be notified of changes.
Since it seems like we've identified the root cause and found a fix, I'm going to close this. Please comment if you have any other concerns.
from lightgbm.
Related Issues (20)
- C API refitting HOT 6
- [python-package] bug : dump_model json loads failed HOT 2
- [R-package] latest {Matrix} requires R>=4.4.0
- [RFC] remove 'categorical_feature' and 'feature_name' parameters in cv() and train() HOT 6
- [RFC] remove HDFS support? HOT 3
- (transferred) [python-package] how to install the Python package from source? HOT 5
- [RFC] provide Python/R implementations of all the built-in objectives? HOT 1
- [python-package] Error in installation in github MacOS runners HOT 2
- [docs] readthedocs builds are broken HOT 1
- CMake `__BUILD_FOR_R` fails to find R source files HOT 4
- [docker] Update Tutorial for Installing LightGBM GPU on Docker Environment HOT 3
- [python-package] NumPy 2.0 support HOT 1
- LightGBM failed to testlightgbm.exe on MSVC HOT 1
- Lightgbm trains much slower than catboost. HOT 15
- Any suggestions for predicting all values to be 0? HOT 1
- [python-package] How to refit a classifier? HOT 4
- Uncertainty in LightGBM (again) HOT 4
- Can not predict with multithread? HOT 1
- [ci] CUDA 11.8 wheel (gcc) CI jobs failing: 'libomp.so.5: no such file or directory'
- [GPU] lightgbm.basic.LightGBMError: Check failed: (best_split_info.left_count) > (0), lightgbm.basic.LightGBMError: Check failed: (best_split_info.right_count) > (0)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lightgbm.