abess-team / abess

Fast Best-Subset Selection Library
https://abess.readthedocs.io/
Other
474 stars 41 forks source link

Segmentation fault using v0.4.6 on Linux #496

Closed ecm200 closed 1 year ago

ecm200 commented 1 year ago

Describe the bug

When installing v0.4.6 any calls to the abess library causes a segmentation fault.

The same simple script with v0.4.5 results in a normal execution.

Code for Reproduction

from abess.linear import LinearRegression
from abess.datasets import make_glm_data
import numpy as np
np.random.seed(12345)
data = make_glm_data(n = 100, p = 50, k = 10, family = 'gaussian')
model = LinearRegression(support_size = 10)
model.fit(data.x, data.y)

print(model.predict(data.x)[:4])

Using v0.4.6 results in the following error:

image

Expected behavior

I expected the predictions to be printed without segmentation fault.

Example run with v0.4.5:

image

Desktop (please complete the following information):

oooo26 commented 1 year ago

Hi @ecm200, we have confirmed the bug and so sorry for the inconvenience. It seems the problem on the latest wheels. Please temporarily use the old version or install from source pip install abess==0.4.6 --no-binary=abess.

Thank you for the feedback! We will fix the problem soon.

ecm200 commented 1 year ago

No worries at all, no need to apologize. Glad I could help pointing something out.

As I did above, I confirmed that v0.4.5 is indeed working as expected.

ecm200 commented 1 year ago

Hi @ecm200, we have confirmed the bug and so sorry for the inconvenience. It seems the problem on the latest wheels. Please temporarily use the old version or install from source pip install abess==0.4.6 --no-binary=abess.

Thank you for the feedback! We will fix the problem soon.

Thanks for the workaround, I can confirm that I've built the package from source, and it is now running successfully using v0.4.6.

oooo26 commented 1 year ago

It is a weird bug... I have checked the wheels built by our PyPI workflow and the problem exists even for:

However I haven't reproduced it in a simpler demo package. One solution is to revert the version of cibuildwheel to v2.3.1, which used to build ABESS v0.4.5.

@Mamba413 Do u think we should revert the version and publish a workable version first?

Mamba413 commented 1 year ago

@oooo26 ,thanks! Just revert the version of cibuildwheel. Also, shall we report this bug to the team for cibuildwheel?

oooo26 commented 1 year ago

@oooo26 ,thanks! Just revert the version of cibuildwheel. Also, shall we report this bug to the team for cibuildwheel?

Sure, I will revert it. And actually I tend to try making a simpler demo before reporting.