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

fix feature index in Dataset::AddFeaturesFrom (fixes #5410) #5650

Merged
merged 2 commits into from
Dec 29, 2022

Conversation

jameslamb
Copy link
Collaborator

Replaces #5434.
Fixes #5410.

Thanks to @EdmondElephant for discovering this bug, investigating it in #5410, and for fixing it in #5434!

I'm just replacing that PR with this one due to lack of response there (it has been more than 3 months since the last comment there).

Notes for Reviewers

I ran the following to test that this new unit test segfaults on master and passes on this PR.

mkdir build
cd build
cmake ..
make -j4
cd ../python-package
python setup.py --install
cd tests/python_package_test
pytest 'test_basic.py::test_add_features_does_not_fail_if_initial_dataset_has_zero_informative_features'

@jameslamb jameslamb merged commit 51edbda into master Dec 29, 2022
@jameslamb jameslamb deleted the fix/numeric-feature-map branch December 29, 2022 18:46
@github-actions
Copy link

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

Successfully merging this pull request may close these issues.

Should use other->numeric_feature_map_[i] in AddFeaturesFrom
2 participants