I've been having trouble saving lightgbm boosters after running a model with the bonsai and the tidymodels package (as in this StackOverflow thread How to save Tidymodels Lightgbm model for reuse - however, I never managed to get it to work).
Therefore, reading about it (and as it says on the update in the abovementioned StackOverflow thread) led me to find out that the development version of the lightgbm package (version 4.0 I believe) supports using saveRDS and readRDS directly for their lightgbm models.
The thing is, I don't know how to install the development version of lightgbm. Reading this thread I can see that James, who's one of the maintainers of the lightgbm package, wrote this (https://github.com/tidymodels/bonsai/issues/34):
"If you already have a local installation of LightGBM, you can re-install from the latest development version by running the following:"
REPO_DIR="${HOME}/repos"
cd "${REPO_DIR}/lgb-dev"
git checkout master
git pull origin master
git submodule update --recursive
sh build-cran-package.sh \
--no-build-vignettes
R CMD INSTALL \
--with-keep.source \
./lightgbm_*.tar.gz
My problem is that I do not understand this code. Is it supposed to be run in R? (this does not work for me). Or in the command line? Which language is this?
If anyone can help me out regarding installation of the dev version of the lightgbm package, I would be really grateful