XGBoost offers an option setting for controlling the behavior of deprecated and removed function arguments.
Some of the arguments in functions like xgb.train()
or predict.xgb.Booster()
been renamed
from how they were in previous versions, or have been removed.
In order to make the transition to newer XGBoost versions easier, some of these parameters are still accepted but issue a warning when using them. Note that these warnings will become errors in the future!! - this is just a temporary workaround to make the transition easier.
One can optionally use 'strict mode' to turn these warnings into errors, in order to ensure that code calling xgboost will still work once those are removed in future releases.
Currently, the only supported option is xgboost.strict_mode
, which can be set to TRUE
or
FALSE
(default).
In addition to an R option, it can also be enabled through by setting environment variable
XGB_STRICT_MODE=1
. If set, this environment variable will take precedence over the option.
Examples
options("xgboost.strict_mode" = FALSE)
options("xgboost.strict_mode" = TRUE)
Sys.setenv("XGB_STRICT_MODE" = "1")
Sys.setenv("XGB_STRICT_MODE" = "0")