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

[python-package] ignore scikit-learn 'check_sample_weight_equivalence' estimator check (fixes #6678) #6679

Merged
merged 2 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .ci/conda-envs/ci-core-py38.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ bokeh=3.1.*
fsspec=2024.5.*
msgpack-python=1.0.*
pluggy=1.5.*
pyparsing=3.1.4
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While working on this, I discovered #6680.

Have reported that issue upstream: conda-forge/pyparsing-feedstock#48

For LightGBM's purposes, testing on an old version of Python, let's just pin it as we do other libraries in these environments.

pytz=2024.1
setuptools=69.5.*
snappy=1.2.*
Expand Down
6 changes: 6 additions & 0 deletions python-package/lightgbm/sklearn.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,12 @@ def _more_tags(self) -> Dict[str, Any]:
"check_no_attributes_set_in_init": "scikit-learn incorrectly asserts that private attributes "
"cannot be set in __init__: "
"(see https://github.com/microsoft/LightGBM/issues/2628)",
"check_sample_weight_equivalence": (
"In LightGBM, setting a sample's weight to 0 can produce a different result than omitting the sample. "
"Such samples intentionally still affect count-based measures like 'min_data_in_leaf' "
"(https://github.com/microsoft/LightGBM/issues/5626#issuecomment-1712706678) and the estimated distribution "
"of features for Dataset construction (see https://github.com/microsoft/LightGBM/issues/5553)."
),
},
}

Expand Down
Loading