[R-package] fix warnings in unit tests #4225
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses several (but not all) of the R unit test warnings documented in #4108.
Unknown parameter: valids / {memory_address}
These warnings were caused by calls that were passing
valids
tolgb.cv()
.lgb.cv()
does not accept validation data...it creates holdout sets using k-fold cross-validation.This is an example of something that is currently a warning which would be an error if
...
was not allowed (#4202 (comment),
will write up a feature request soon#4226).Unknown parameter: categorical_features
There are no meaningful features
This came from the test
lgb.train() works with linear learners and data where a feature has only 1 non-NA value
. That test should have added an additional feature with enough variability to be usable during training.Notes for Reviewers
#4108 was originally opened as a
good first issue
about a month ago, with the hope that an outside contributor would pick it up. Normally I'd leave such an issue for non-maintainers. However, I want to focus on the R package over the next few weeks because of some issues that have been building up about it.Lrnr_lightgbm
broken on Windows tlverse/sl3#344 & Disable LightGBM testing on Windows tlverse/sl3#345Given that I expect a lot of activity on the R package in the near future, I think it's very important that the R package's unit tests cover the package as reliably as possible.