[python-package] remove support for passing 'feature_name' and 'categorical_feature' through train() and cv() #6706
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contributes to #6435
Removes the following keyword arguments from
train()
andcv()
in the Python package:categorical_feature
feature_name
Notes for Reviewers
Benefits of these changes
Simplifies the project's public API, to avoid confusion like https://stackoverflow.com/questions/78383840/in-lightgbm-why-do-the-train-and-the-cv-apis-accept-categorical-feature-argument.
Why now?
Deprecation warnings about these changes have been in
lightgbm
since v4.4.0 (June 2024). I expect it will be at least another month until another release of LightGBM is published, so by then it will have been multiple releases and close to 6 months. I think that's long enough.Why only Python?
The corresponding R package changes are a bit more extensive and will generate a bit more discussion, I think. Proposing separating them to make reviewing easier and to allow one set of changes to be merged without blocking the other set.