-
Notifications
You must be signed in to change notification settings - Fork 3.9k
[R-package] [docs] fix broken plots in pkgdown site (fixes #3276) #3508
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
Conversation
|
@StrikerRUS I created this from a LightGBM branch so we can test. Can you please enable RTD builds for it? Thank you! |
Sure, done! |
|
looks like the RTD build passed: https://readthedocs.org/projects/lightgbm/builds/12229562/ and looks like the plots are fixed! https://lightgbm.readthedocs.io/en/fix-r-plots//R/reference/lgb.plot.importance.html https://lightgbm.readthedocs.io/en/fix-r-plots//R/reference/lgb.plot.interpretation.html |
|
@jameslamb |
sure! |
|
upgraded to 3.18.2 in 22f9dcb, let's see if it works |
|
This worked with the newer ✅ https://readthedocs.org/projects/lightgbm/builds/12234522/ https://lightgbm.readthedocs.io/en/fix-r-plots//R/reference/lgb.plot.importance.html https://lightgbm.readthedocs.io/en/fix-r-plots//R/reference/lgb.plot.interpretation.html I think we can merge this and delete the branch once CI passes |
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.
Great! Thanks for the fix!
|
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. |




#3276 documents some issues rendering plots in examples for the R package's documentation site, at https://lightgbm.readthedocs.io/en/latest/R/reference/.
I think that this is caused by the use of an older R version. This PR proposes fixing that by upgrading to R 4.0.3. It seems that R 4.0.3 packages are now available from conda-forge (thanks to the hard work of @xhochy and other https://github.com/conda-forge/r-base-feedstock maintainers).
This PR also simplifies our setup on RTD in a few ways:
testthatreposoptionNotes for Reviewers
I tested locally with the following code, on an Ubuntu 18.04 laptop using
conda4.8.4:conda create \ -q \ -y \ -c conda-forge \ -n r_env \ cmake=3.14.0=h52cb24c_0 \ r-base=4.0.3=hc603457_2 \ r-data.table=1.13.2=r40h0eb13af_0 \ r-jsonlite=1.7.1=r40hcdcec82_0 \ r-matrix=1.2_18=r40h7fa42b6_3 \ r-pkgdown=1.6.1=r40h6115d3f_0 \ r-roxygen2=7.1.1=r40h0357c0b_0 export R_LIBS="$CONDA_PREFIX/lib/R/library" Rscript build_r.R cd R-package Rscript -e "roxygen2::roxygenize(load = 'installed')" Rscript -e "pkgdown::build_site( \ lazy = FALSE \ , install = FALSE \ , devel = FALSE \ , examples = TRUE \ , run_dont_run = TRUE \ , seed = 42L \ , preview = FALSE \ , new_process = TRUE \ ) \ "At least locally, the plots look ok now