Skip to content

Commit

Permalink
use CRAN's lightgbm
Browse files Browse the repository at this point in the history
  • Loading branch information
dfalbel committed Nov 6, 2021
1 parent 490a3aa commit c872c42
Showing 1 changed file with 1 addition and 47 deletions.
48 changes: 1 addition & 47 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,61 +25,15 @@ jobs:
remotes::install_deps(dependencies = TRUE, INSTALL_opts = c("--no-multiarch"))
shell: Rscript {0}

- name: Remove lightgbm
run: |
remove.packages("lightgbm")
shell: Rscript {0}

- name: Install dev lightgbm
run: |
cd ..
git clone --recursive https://github.com/microsoft/LightGBM.git --branch fix/network-setup
cd LightGBM
sh build-cran-package.sh
Rscript -e "install.packages(c('R6', 'data.table', 'jsonlite'))"
Rscript -e "install.packages('lightgbm_3.2.1.99.tar.gz', repos = NULL, type='source')"
- name: Install catboost
run: |
remotes::install_url("https://github.com/catboost/catboost/releases/download/v0.26/catboost-R-Windows-0.26.tgz", INSTALL_opts = c("--no-multiarch"))
shell: Rscript {0}

- name: catboost and lightgbm
run: |
library(lightgbm)
data(agaricus.train, package='lightgbm')
print(sessionInfo())
train <- agaricus.train
dtrain <- lgb.Dataset(train$data, label = train$label)
model <- lgb.cv(
params = list(
objective = "regression"
, metric = "l2"
)
, data = dtrain
)
shell: Rscript {0}

- name: catboost and lightgbm
run: |
library(parsnip)
library(lightgbm)
data(agaricus.train, package='lightgbm')
print(sessionInfo())
train <- agaricus.train
dtrain <- lgb.Dataset(train$data, label = train$label)
model <- lgb.cv(
params = list(
objective = "regression"
, metric = "l2"
)
, data = dtrain
)
shell: Rscript {0}
- name: Check
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--no-multiarch"), error_on = "error", check_dir = "check")
shell: Rscript {0}

- name: Show testthat output
if: always()
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
Expand Down

0 comments on commit c872c42

Please sign in to comment.