From 5d2d651218c6a10a85ef31d30b23465b9d6a158f Mon Sep 17 00:00:00 2001 From: James Lamb Date: Mon, 2 Dec 2024 21:14:53 -0600 Subject: [PATCH] more parallelization in crandep install, try to make it pass --- .github/workflows/r_revdepchecks.yml | 4 ++-- R-package/R/lgb.train.R | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/r_revdepchecks.yml b/.github/workflows/r_revdepchecks.yml index 9f6c45b846f4..c73f49aa378f 100644 --- a/.github/workflows/r_revdepchecks.yml +++ b/.github/workflows/r_revdepchecks.yml @@ -78,10 +78,10 @@ jobs: sh ./build-cran-package.sh - name: pre-install binary packages # pre-install all of the dependencies... tools::check_packages_in_dir() - # is hard-coded to compile them all from source + # is hard-coded to compile them all from source, which takes a long time # (https://github.com/wch/r-source/blob/594b842678e932088b16ec0cd3c39714a141eed9/src/library/tools/R/checktools.R#L295) run: | - Rscript -e "install.packages('crandep', repos='https://cran.r-project.org')" + Rscript -e "install.packages('crandep', repos='https://cran.r-project.org', Ncpus = parallel::detectCores())" Rscript ./.ci/download-r-revdeps.R - name: run revdepchecks run: | diff --git a/R-package/R/lgb.train.R b/R-package/R/lgb.train.R index 237562e5beb0..4d994cfc6f04 100644 --- a/R-package/R/lgb.train.R +++ b/R-package/R/lgb.train.R @@ -66,8 +66,6 @@ lgb.train <- function(params = list(), reset_data = FALSE, serializable = TRUE) { - stop("THIS IS AN ERROR FOR TESTING") - # validate inputs early to avoid unnecessary computation if (nrounds <= 0L) { stop("nrounds should be greater than zero")