You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When passing a list of parameters to cb.reset.parameters(), that function should validate the list that you pass in.
Motivation
Currently, it's possible to use cb.reset.parameters() to sneak bad parameters (e.g. negative num_leaves) into a LightGBM model. Sometimes you might catch this because an error will be thrown elsewhere, but in other cases your code might run but produce incorrect results.
Description
To close this issue, add some code that checks params in cb.reset.parameters() (R-package/R/callback.R). To avoid duplicate code and inconsistencies, it might be valuable to centralize that logic in an internal function like .check_params(params), which then also gets used in lgb.train() and lgb.cv().
References
A centralized parameter-checking function as described in the description section did once exist in the R package (lgb.check.params()) but it was empty. That function was removed in #2652 .
The text was updated successfully, but these errors were encountered:
Summary
When passing a list of parameters to
cb.reset.parameters()
, that function should validate the list that you pass in.Motivation
Currently, it's possible to use
cb.reset.parameters()
to sneak bad parameters (e.g. negativenum_leaves
) into aLightGBM
model. Sometimes you might catch this because an error will be thrown elsewhere, but in other cases your code might run but produce incorrect results.Description
To close this issue, add some code that checks
params
incb.reset.parameters()
(R-package/R/callback.R
). To avoid duplicate code and inconsistencies, it might be valuable to centralize that logic in an internal function like.check_params(params)
, which then also gets used inlgb.train()
andlgb.cv()
.References
A centralized parameter-checking function as described in the description section did once exist in the R package (
lgb.check.params()
) but it was empty. That function was removed in #2652 .The text was updated successfully, but these errors were encountered: