Skip to content
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

Check failed: (best_split_info.left_count) > (0) when using the ''cegb_penalty_feature_coupled'' parameter #5317

Closed
ZhangTP1996 opened this issue Jun 22, 2022 · 5 comments
Labels

Comments

@ZhangTP1996
Copy link

ZhangTP1996 commented Jun 22, 2022

Description

[LightGBM] [Fatal] Check failed: (best_split_info.left_count) > (0) at /__w/1/s/python-package/compile/src/treelearner/serial_tree_learner.cpp, line 653 .

Reproducible example

The error happens when I use the "cegb_penalty_feature_coupled" parameter. If we remove the parameter, the error disappears.
A minimal example to reproduce the error:

import lightgbm as lgb
import pandas as pd

X = pd.read_csv('./cegb_X.csv', index_col=0)
y = pd.read_csv('./cegb_Y.csv', index_col=0)
params = {"n_estimators": 1000, "importance_type": "gain", "num_leaves": 64,
          "cegb_penalty_feature_coupled": [1 for _ in range(X.shape[1])],
          "seed": 1, "n_jobs": 40}
gbm = lgb.LGBMRegressor(**params)
gbm.fit(X, y)

cegb_X.csv
cegb_Y.csv

@ZhangTP1996
Copy link
Author

The problem is fixed by installing the latest version 3.3.2.99

@jameslamb
Copy link
Collaborator

Thanks very much for coming back to close this!

I suspect the issue you faced was the same as #3679, which was fixed in #5164.

@jameslamb jameslamb added the bug label Jun 24, 2022
@jameslamb
Copy link
Collaborator

And thank you very much for providing a reproducible example, it's greatly appreciated 😊

@ZhangTP1996
Copy link
Author

And thank you very much for providing a reproducible example, it's greatly appreciated 😊

You are welcome 😊

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants