-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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] scikit-learn fit() methods: add eval_X, eval_y, deprecate eval_set #6857
base: master
Are you sure you want to change the base?
Conversation
48f4698
to
197a3bd
Compare
197a3bd
to
5dd3171
Compare
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-files
And 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. |
As discussed in scikit-learn/scikit-learn#28901 (comment), this PR adds
eval_X
andeval_y
in 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.