diff --git a/.github/workflows/r_revdepchecks.yml b/.github/workflows/r_revdepchecks.yml index d2bc26d0e1d6..e3588f301236 100644 --- a/.github/workflows/r_revdepchecks.yml +++ b/.github/workflows/r_revdepchecks.yml @@ -54,7 +54,7 @@ jobs: brew install libomp - name: build package run: | - Rscript -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'markdown', 'Matrix', 'RhpcBLASctl'), repos = 'https://cran.r-project.org', Ncpus = parallel::detectCores())" + Rscript -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'markdown', 'Matrix', 'RhpcBLASctl'), repos = 'https://cran.r-project.org', Ncpus = parallel::detectCores(), type = 'binary')" sh ./build-cran-package.sh - name: run revdepchecks run: | diff --git a/R-package/R/lgb.train.R b/R-package/R/lgb.train.R index b071d2791ffe..237562e5beb0 100644 --- a/R-package/R/lgb.train.R +++ b/R-package/R/lgb.train.R @@ -66,7 +66,7 @@ lgb.train <- function(params = list(), reset_data = FALSE, serializable = TRUE) { - stop("THIS IS THE LIFE BAH-DUM BAH-DUM-DUM") + stop("THIS IS AN ERROR FOR TESTING") # validate inputs early to avoid unnecessary computation if (nrounds <= 0L) { diff --git a/R-package/vignettes/basic_walkthrough.Rmd b/R-package/vignettes/basic_walkthrough.Rmd index f9f4720c408f..1641ec71160f 100644 --- a/R-package/vignettes/basic_walkthrough.Rmd +++ b/R-package/vignettes/basic_walkthrough.Rmd @@ -67,22 +67,6 @@ In a first step, you need to convert data to numeric. Afterwards, you are ready # Numeric response and feature matrix y <- as.numeric(bank$y == "yes") X <- data.matrix(bank[, c("age", "balance")]) - -# Train -fit <- lightgbm( - data = X - , label = y - , params = list( - num_leaves = 4L - , learning_rate = 1.0 - , objective = "binary" - ) - , nrounds = 10L - , verbose = -1L -) - -# Result -summary(predict(fit, X)) ``` It seems to have worked! And the predictions are indeed probabilities between 0 and 1. @@ -101,14 +85,6 @@ params <- list( , num_leaves = 4L , learning_rate = 1.0 ) - -# Train -fit <- lgb.train( - params - , data = dtrain - , nrounds = 10L - , verbose = -1L -) ``` Try it out! If stuck, visit LightGBM's [documentation](https://lightgbm.readthedocs.io/en/latest/R/index.html) for more details.