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

“LightGBMError: Bug. There should be only one multi-val group.” #3458

Closed
stakas opened this issue Oct 16, 2020 · 4 comments
Closed

“LightGBMError: Bug. There should be only one multi-val group.” #3458

stakas opened this issue Oct 16, 2020 · 4 comments

Comments

@stakas
Copy link

stakas commented Oct 16, 2020

Apologies for turning here in a StackOverflow fashion, but I have not found any other kind of LightGBM help, so this is the last resort.

I am loading a series of large binary independently binarized with save_binary LightGBM files and concatenating them into a single file to train GBT with LightGBM, however, train method fails with a cryptic error message:

"LightGBMError: Bug. There should be only one multi-val group."

I haven't found anything anywhere regarding this error and had a peek into C++ code and it seems that there is a fix pending regarding this:

// FIXME: fix the multiple multi-val feature groups, they need to be merged

In the meantime, can somebody advise me how to change my data so that the Dataset contruction would work? Thank you in advance.

My snippet is as follows:

import lightgbm as lgb

my_files = ['p1.bin', 'p2.bin', 'p3.bin']

full_data = lgb.Dataset(my_files[0]).construct()

for f in my_files[1:]:        
    full_data.add_features_from(lgb.Dataset(f).construct())  

feature_name = ['feature_' + str(col) for col in range(full_data.num_feature())]
full_data.feature_name = feature_name

params = {'objective': 'binary', 
         'learning_rate': 0.01,
         'metric': ['binary'],
        }

bst = lgb.train(params = params, 
                train_set = full_data, 
                num_boost_round = 500,
                feature_name = feature_name,
                ) 
@StrikerRUS
Copy link
Collaborator

Hello @stakas !

Could you please try this branch?
https://github.com/microsoft/LightGBM/tree/fix-add-features

I hope #2754 will fix this issue.

@stakas
Copy link
Author

stakas commented Oct 16, 2020

Ah, I had a hunch that is related to the addition of data sets, just could not get through the woods of C code. Will get some sleep and try fix-add-features branch.

Your help much is appreciated @StrikerRUS !

@StrikerRUS
Copy link
Collaborator

Fixed in #2754. Feel free to reopen if the error hasn't gone.

@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 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants