-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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] move all examples to dontrun() to fix R CMD CHECK notes #3270
Conversation
I've re-submitted the R Hub checks for all checks that had the note about example timings. These can sometimes take up to a day to run, so I'll update this PR with the results whenever they run. result <- rhub::check(
path = "lightgbm_2.3.2.tar.gz"
, email = "jaylamb20@gmail.com"
, check_args = "--as-cran"
, platform = c(
"ubuntu-gcc-release",
"ubuntu-gcc-devel",
"debian-gcc-devel-nold",
"debian-clang-devel",
"linux-x86_64-centos6-epel-rdt"
)
, env_vars = c(
"R_COMPILE_AND_INSTALL_PACKAGES" = "always"
)
) |
Sure! Just enabled this branch at RTD. Let's wait about 8mins for results. |
BTW, seems that something is wrong with the plot at |
I don't know if this is one of the things CRAN is open to negotiation on or not. My thinking is that getting to CRAN is the highest priority and that losing these plots in examples is a very small price to pay for it because (I believe) the main way people use these examples is to copy the code and run it themselves anyway. There are no running-time restrictions on vignettes, as far as I know. so when we pick up #1944 we can have any beautiful logs and plots we want. So my longer-term goal is to still do this suggestion (#629 (comment)), where we completely remove these examples and all the function-level documentation points users to the appropriate vignette(s). But that is the type of thing we can do totally independent of CRAN. |
I totally agree with you in that CRAN is much more important than examples. But what do you think about
? I just checked pkgdown site and seems we can pass |
oooooo I forgot about |
That's awesome! Thank you! Please don't forget that previous |
😬 😬 I did forget! I thought we added them in an attempt to fix that "examples take too long to run" issue. If they cause it to fail, I'll just literally put an |
OK, sure! To be honest I don't know whether |
The R Hub checks finally returned, but I missed one example so they all have that NOTE about timing 🙃 fixed (along with this change: #3270 (comment)) in 249f010 I'll check the RTD build in a few minutes to see if it is ok, and look into the issue with the plot |
looks like the build succeeded! https://readthedocs.org/projects/lightgbm/builds/11597488/ And example outputs are back! (https://lightgbm.readthedocs.io/en/docs-fix-sample-runtime/R/reference/lgb.train.html): It's a little annoying that the The plot example on lgb.plot.interpretation is still broken, which is confusing because it looks ok on my laptop I'm looking into that right now. |
I believe the version of R can cause the difference in outputs. However, this is not releated to this PR, so it should not block us from its merging. Line 229 in b5027de
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems that unloader
doesn't cause RTD fails anymore. This is really cool!
Thank you for one more -1 CRAN NOTE!
I agree, I'll open a new issue. I was trying to upgrade the conda environment to 3.6.1 (the latest |
…BM into docs/fix-sample-runtime
R Hub results came back! The example timing note has been eliminated from all of them! ✅ 1 WARNING, 2 NOTEs
✅ 1 WARNING, 2 NOTEs
✅ 1 WARNING, 2 NOTEs
❌ 1 ERROR, 1 WARNING, 2 NOTEs
✅ 2 NOTEs
|
I added #3276 to track fixing those plots |
This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this. |
In the R Hub checks I ran in #629 (comment), builds on several linux systems had this
R CMD CHECK
note:My first idea to fix these issues was to move all examples to vignettes (#629 (comment)), but tonight I had another idea that I think is a lot easier.
\dontrun{}
so by default they aren't runR CMD CHECK --run-dontrun
so that in CI, we still test that all the examples work. We can ignore the example-timing NOTE if it comes up, because the\dontrun{}
means it will never come up on CRANThis PR also replaces uses of
\donttest{}
with\dontrun{}
. As of R 4.02,\donttest{}
examples will be run byR CMD CHECK
(release notes)@StrikerRUS I made this a LightGBM branch so we could test readthedocs. Could you enable readthedocs build temporarily for this branch?