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
Kernel panic / Segmentation fault when trying to run example #223
Comments
I also tried this with 3.7.9, and got the same error. Here are my packages:
These packages were installed in a fresh virtualenv, with only |
In your code snippet,
|
@sonichi My bad, that was a copy-and-paste error. Even with X and y properly defined, the code segfaults! Did you try with a fresh virtual environment? Oddly enough, in a separate virtual environment with many other packages installed, the code runs fine, so I wonder if there's a package missing? |
Yes, it works for me in a fresh conda environment of Python 3.7.9 and astroid 2.3.3 |
Not sure if this makes a difference, but I'm not using conda! 🤔 |
I tried venv with Python 3.7.5 and it works too. I ran catboost 0.26.1 |
I tried again with a new environment, but still no luck. Here are the exact commands I ran:
Dependencies look like:
Currently using pip 21.2.4. Could this be related to OS? I'm using macOS Big Sur, version 11.5.2. 🤔 |
Hi @angela97lin, I wonder is your Mac computer with Intel chip or Apple M1? Thank you! |
Hi, I tried 3.7.9 and 3.9.6 in Windows. They both worked fine. |
I have an Intel chip: |
Hi I tried Python 3.8.6 on a duo-core intel core i7, MacOS Big Sur. It works fine for me. |
@angela97lin Could you try |
Hi @angela97lin, I tried Python 3.8.5 and Python 3.7.5 with MacOS Big Sur and Intel chip. Both work fine for me. Can you try re-installing with the |
Thanks for all of the replies! I've tried with I noticed that it usually segfaults during lightgbm / xgboost. When I update my code to:
Everything runs to completion! |
Do lightgbm and xgboost work on your machine without flaml? |
Yup, they do. Not sure if this is helpful, but everything works fine in a virtual environment that I use day-to-day for development. This virtual environment has many more packages installed, listed below. I only run into this issue when I try to create a new virtual environment. Packages in virtual environment that does not cause FLAML to segfault:
|
The lightgbm version in this working env is 3.0.0. The failing env has version 3.2.1. Could that be the cause? |
Still no luck 😬
|
We can add some debugging info to the output and then you can run it and confirm whether the error happens right before lightgbm training. Would you like to do that? |
Sure! If this is helpful, installing FLAML in an editable mode and setting a breakpoint shows:
Stepping through, it seg faults when running |
I added the debugging mode in the branch
before the seg fault, then the lgbm fit succeeds. If you only see the first msg but not the second one, then the seg fault happens during fit. |
@angela97lin In #243 another user reported a similar issue in MacOS and confirmed that lgbm's fit() fails without flaml. Could you test lightgbm in your env without flaml too? |
conda package of flaml is available now and it's supposed to resolve this issue: #194 (comment) |
@sonichi Sorry for the late response! I confirmed that lightgbm segfaults:
I was able to successfully run my example using conda! Just a side note though, I wasn't able to use catboost without installing it separately. Is it not listed as a dependency?
|
@angela97lin great that it works now. catboost is not available in conda, so we have to remove it from the dependency to make the conda package. |
@sonichi Got it. FWIW, we make our conda package with catboost as a dependency via conda-forge: https://anaconda.org/conda-forge/catboost, could be interesting to look into? Closing this issue though since the original issue is resolved. Thanks again! |
Hi! I tried to install and run a simple example, but ran into a
Segmentation Fault: 11
error when using Python 3.9.6:Running this in both my Jupyter notebook and via bash gives me:
The text was updated successfully, but these errors were encountered: