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

[R-package] add deprecation warnings about some uses of '...' #4522

Merged
merged 2 commits into from
Aug 17, 2021

Conversation

jameslamb
Copy link
Collaborator

Contributes to #4310 (based on #4226 (comment)).

This PR proposes adding some deprecation warnings on uses of ... for parameters in the following functions:

  • dim.lgb.Dataset()
  • getinfo.lgb.Dataset()
  • lgb.cv()
  • lgb.train()
  • setinfo.lgb.Dataset()

Notes for reviewers

Given this R code

library(lightgbm)

data(agaricus.train, package = "lightgbm")
train <- agaricus.train
dtrain <- lgb.Dataset(train$data, label = train$label)

model <- lgb.train(
    params = list(
        objective = "regression"
    )
    , data = dtrain
    , nrounds = 5L
    , bagging_fraction = 0.5
    , bagging_freq = 2L
)

This is the warning shown:

Warning message:
In lgb.train(params = list(objective = "regression"), data = dtrain, :
lgb.train: Found the following passed through '...': bagging_fraction, bagging_freq. These will be used, but in future releases of lightgbm, this warning will become an error. Add these to 'params' instead. See ?lgb.train for documentation on how to call this function.

image

Deprecation warnings for other uses of ... will be addressed in other pull requests.

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!

@jameslamb jameslamb mentioned this pull request Aug 15, 2021
21 tasks
@github-actions
Copy link

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 Aug 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants