-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[R-package] {lightgbm} might be incompatible with some R 3.5.x versions #4813
Comments
I'm investigating this tonight, will share a reproducible example soon. So far I've found that on Linux (the only OS I've tested on), the CRAN package compiles successfully with every release of R 3.5.x, but with 20+ test failures, mostly related to numerical precision issues. Investigated the claim from #4812 (comment) that Looks like R 3.5.0 was released in April 2018: https://cran.r-project.org/bin/windows/base/old/. |
Using the rocker/verse container images, I tested testing script (click me)# build CRAN package
rm -f lightgbm*.tar.gz
sh build-cran-package.sh --no-build-vignettes
# gain a shell in a container
R_VERSION=3.5.3
docker run \
--rm \
-v $(pwd):/opt/LightGBM \
--workdir /opt/LightGBM \
--env MAKE="make -j2" \
-it \
rocker/verse:${R_VERSION} \
/bin/bash
# update to the latest versions of all packages
Rscript \
--vanilla \
-e "install.packages(c('R6', 'data.table', 'jsonlite', 'Matrix', 'testthat'), repos = 'https://cran.r-project.org')"
# install LightGBM from source
R --vanilla CMD INSTALL \
--with-keep.source \
./lightgbm_3.3.1.99.tar.gz
# run the tests
cd R-package/tests
Rscript --vanilla testthat.R On both R 3.5.0 and R 3.5.3 (the first and last releases in that series), I found that:
I haven't looked yet into the specifics of those tests. Stopping this investigation here for now, will come back to it after getting some other PRs up for other things. |
I checked again today with the latest state of I strongly suspect that the handful of tests that are failing are failing because of the changes to random number generation and random sampling between R 3.5.x and R 3.6.0. Mentioned in See https://blog.revolutionanalytics.com/2019/05/whats-new-in-r-360.html
It seems to me that all of the tests that are failing involve the use of Other tests which check for exact results and which do not use randomly-generated data or For example:
Given this... I think we should close this issue, and leave the version floor in the R package set to Even though some of LightGBM's tests fail, it can be compiled successfully and most tests are passing. I think we should avoid putting an artificial restriction on users who may be on older R versions, and that we shouldn't spend time trying to get those tests working on R 3.5.x. @jmoralez or @StrikerRUS what do you think? |
I agree on closing this and keeping the floor at 3.5.0. From #4812 (comment) I think the incompatibility would've caused the compilation to fail because of the missing function in the header so if the package compiles successfully I think the tests are failing only due to the different scores. |
Alright thanks @jmoralez , I'm gonna close this. |
Nice observation!
I agree with both points. |
This issue has been automatically locked since there has not been any recent activity since it was closed. |
Description
See .
Today, the R package's
DESCRIPTION
says it supports R 3.5.0 and newer.LightGBM/R-package/DESCRIPTION
Line 55 in 5fa887b
According to #4812 (comment), recent changes in the R package might have made it incompatible with some R 3.5.x versions.
How to close this issue
Notes
Thanks @david-cortes for reporting this!
The text was updated successfully, but these errors were encountered: