Skip to content

Commit

Permalink
[R-package] remove support for '...' in Booster reset_parameter() (#4856
Browse files Browse the repository at this point in the history
)
  • Loading branch information
jameslamb authored Dec 5, 2021
1 parent aa413f7 commit 76fb0b6
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions R-package/R/lgb.Booster.R
Original file line number Diff line number Diff line change
Expand Up @@ -177,23 +177,12 @@ Booster <- R6::R6Class(

},

reset_parameter = function(params, ...) {

additional_params <- list(...)
if (length(additional_params) > 0L) {
warning(paste0(
"Booster$reset_parameter(): Found the following passed through '...': "
, paste(names(additional_params), collapse = ", ")
, ". These will be used, but in future releases of lightgbm, this warning will become an error. "
, "Add these to 'params' instead."
))
}
reset_parameter = function(params) {

if (methods::is(self$params, "list")) {
params <- utils::modifyList(self$params, params)
}

params <- utils::modifyList(params, additional_params)
params_str <- lgb.params2str(params = params)

self$restore_handle()
Expand Down

0 comments on commit 76fb0b6

Please sign in to comment.