Skip to content

[python-package] remove support for passing 'feature_name' and 'categorical_feature' through train() and cv()#6706

Merged
StrikerRUS merged 1 commit intomasterfrom
python/remove-deprecated
Oct 31, 2024
Merged

[python-package] remove support for passing 'feature_name' and 'categorical_feature' through train() and cv()#6706
StrikerRUS merged 1 commit intomasterfrom
python/remove-deprecated

Conversation

@jameslamb
Copy link
Copy Markdown
Member

Contributes to #6435

Removes the following keyword arguments from train() and cv() 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.

@jameslamb jameslamb marked this pull request as ready for review October 31, 2024 00:00
@StrikerRUS StrikerRUS changed the title WIP: [python-package] remove support for passing 'feature_name' and 'categorical_feature' through train() and cv() [python-package] remove support for passing 'feature_name' and 'categorical_feature' through train() and cv() Oct 31, 2024
Copy link
Copy Markdown
Collaborator

@StrikerRUS StrikerRUS left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks a lot for clearing up these deprecated params from repo.

@StrikerRUS StrikerRUS merged commit 8d5dca2 into master Oct 31, 2024
@StrikerRUS StrikerRUS deleted the python/remove-deprecated branch October 31, 2024 13:48
@jameslamb jameslamb mentioned this pull request Jan 23, 2025
33 tasks
miguelgfierro added a commit to recommenders-team/recommenders that referenced this pull request Mar 31, 2025
…#6706

Signed-off-by: miguelgfierro <miguelgfierro@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 6, 2025

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 Nov 6, 2025
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.

2 participants