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

WIP: [R-package] require lgb.Dataset, remove support for passing 'colnames' and 'categorical_feature' for lgb.train() and lgb.cv() #6714

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

jameslamb
Copy link
Collaborator

Fixes #6435

Enforces deprecations that have been in {lightgbm} sinvce v4.4.0:

  • removes support for passing anything other than an lgb.Dataset to data argument of lgb.cv()
  • removes colnames and categorical_feature arguments from lgb.train() and lgb.cv()

Notes for Reviewers

Still need to do reverse dependency checks

Before this is merged, we should check that it won't break any projects on CRAN that depend on {lightgbm}. I might propose introducing a comment-triggered CI job we can use for this purpose, maybe with https://github.com/r-lib/revdepcheck.

xgboost did something similar recently

As @mayer79 mentioned on #6435. See dmlc/xgboost#10031

…ing 'feature_name' and 'categorical_feature' to lgb.train() and lgb.cv()
@jameslamb jameslamb changed the title WIP: [R-package] require lgb.Dataset for lgb.cv(), remove support for passing 'colnames' and 'categorical_feature' to lgb.train() and lgb.cv() WIP: [R-package] require lgb.Dataset, remove support for passing 'colnames' and 'categorical_feature' for lgb.train() and lgb.cv() Nov 3, 2024
@jameslamb jameslamb marked this pull request as ready for review February 10, 2025 05:55
@jameslamb
Copy link
Collaborator Author

Setting up a CI job to run reverse dependency checks is taking too long (#6734), let's not block this on that.

Tomorrow, I will just test all the reverse dependencies manually. I won't merge this until I've done that and posted a comment here summarizing that.

But opening this up now for review... @StrikerRUS or @jmoralez could you review? This + #5010 are the last 2 things I'd like to try to get into v4.6.0, and as a reminder we only have 5 more days to put up a v4.6.0 release on CRAN (#6791).

Neither of those is critical, so if you do not have time to review please just let me know and we can skip them for this release.

Copy link
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, thank you for removing deprecated args!

@jameslamb jameslamb self-assigned this Feb 10, 2025
@jameslamb
Copy link
Collaborator Author

jameslamb commented Feb 11, 2025

Listing out the reverse dependencies (from https://cran.r-project.org/web/packages/lightgbm/index.html). I'll update this comment as I run the tests (probably tomorrow, my timezone, at this point, sorry).

Reverse Imports

{cbl}

{misspi}

{predhy}

{predhy.GUI}

{sae.projection}

{ubair}

Reverse Suggests

{bonsai}

{EIX}

{fastml}

{mllrnrs}

{qeML}

{r2pmml}

{SHAPforxgboost}

{stackgbm}

{treeshap}

Reverse Enhances

{fastshap}

{shapviz}

{vip}

@mayer79
Copy link
Contributor

mayer79 commented Feb 11, 2025

I like these changes,thanks for working on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFC] remove 'categorical_feature' and 'feature_name' parameters in cv() and train()
3 participants