-
Notifications
You must be signed in to change notification settings - Fork 4k
[python-package] scikit-learn fit() methods: add eval_X, eval_y, deprecate eval_set #6857
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
base: master
Are you sure you want to change the base?
Conversation
48f4698 to
197a3bd
Compare
197a3bd to
5dd3171
Compare
jameslamb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! It's looking like you're struggling to get this passing CI, so I'm going to put into "draft" for now. @ me any time here if you need help with development, and we can open this back up for review once CI is passing.
I saw you had multiple commits responding to linting errors... here's how to run those locally for faster feedback:
# (or conda, whatever you want)
pip install pre-commit
pre-commit run --all-filesAnd here's how to build locally and run the tests:
# step 1: compile lib_ligihgbtm
# (only need to do this once, because you're not making any C/C++ changes)
cmake -B build -S .
cmake --build build --target _lightgbm -j4
# step 2: install the Python package, re-using it
# (do this every time you change Python code in the library)
sh build-python.sh install --precompile
# step 3: run the scikit-learn tests
pytest tests/python_package_test/test_sklearn.py|
@jameslamb Thanks for your suggestions. |
Making both options available for a time and raising a deprecation warning when I'm sorry but I cannot invest much time in this right now (for example, looking into whether this would introduce inconsistencies with
No, please. As I said in scikit-learn/scikit-learn#28901 (comment), removing |
|
@jameslamb I'm sorry, I really need a maintainer's help. The tests in |
|
@jameslamb Thank you so much. Pinning |
|
The remaining CI failures seem unrelated. |
@lorentzenchr if you are interested in continuing this I'd be happy to help with reviews. I'm supportive of adding this, for better compatibility with newer versions of |
As discussed in scikit-learn/scikit-learn#28901 (comment), this PR adds
eval_Xandeval_yin order to make LGBM estimators compatible with scikit-learn's (as of version 1.6)Pipeline(..., transform_input=["eval_X"]).See also scikit-learn/scikit-learn#27124.