Unverified Commit c27ebcd8 authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[R-package] deprecate uses of '...' in Dataset slice() method (#4572)



* [R-package] deprecate uses of '...' in Dataset slice() method

* Update R-package/R/lgb.Dataset.R

* Update R-package/R/lgb.Dataset.R
Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
parent 053e888d
...@@ -500,6 +500,16 @@ Dataset <- R6::R6Class( ...@@ -500,6 +500,16 @@ Dataset <- R6::R6Class(
# Slice dataset # Slice dataset
slice = function(idxset, ...) { slice = function(idxset, ...) {
additional_params <- list(...)
if (length(additional_params) > 0L) {
warning(paste0(
"Dataset$slice(): Found the following passed through '...': "
, paste(names(additional_params), collapse = ", ")
, ". These are ignored and should be removed. "
, "In future releases of lightgbm, this warning will become an error."
))
}
# Perform slicing # Perform slicing
return( return(
Dataset$new( Dataset$new(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment