From 57b5f568cfb0f425fe12a968163c6d23a96a2eb2 Mon Sep 17 00:00:00 2001 From: tonyk7440 Date: Mon, 28 Dec 2020 16:31:00 +0000 Subject: [PATCH 1/3] don't evaluate vignette for cmd check --- vignettes/working-with-lightgbm-catboost.Rmd | 1 + 1 file changed, 1 insertion(+) diff --git a/vignettes/working-with-lightgbm-catboost.Rmd b/vignettes/working-with-lightgbm-catboost.Rmd index 05c11c4..4f848a7 100644 --- a/vignettes/working-with-lightgbm-catboost.Rmd +++ b/vignettes/working-with-lightgbm-catboost.Rmd @@ -11,6 +11,7 @@ vignette: > knitr::opts_chunk$set( collapse = TRUE, comment = "#>", + eval = FALSE, warning = FALSE, message = FALSE ) From 1d2ed35074c09fc0ed05905cc68aa81d50d4a798 Mon Sep 17 00:00:00 2001 From: tonyk7440 Date: Mon, 28 Dec 2020 18:46:56 +0000 Subject: [PATCH 2/3] sample_size to sample_prop avoid gte 1 error --- R/catboost.R | 2 +- R/lightgbm.R | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/R/catboost.R b/R/catboost.R index c5e1626..072d8cd 100644 --- a/R/catboost.R +++ b/R/catboost.R @@ -189,7 +189,7 @@ add_boost_tree_catboost <- function() { parsnip::set_model_arg( model = "boost_tree", eng = "catboost", - parsnip = "sample_size", + parsnip = "sample_prop", original = "subsample", func = list(pkg = "dials", fun = "sample_size"), has_submodel = FALSE diff --git a/R/lightgbm.R b/R/lightgbm.R index a89237e..29538ce 100644 --- a/R/lightgbm.R +++ b/R/lightgbm.R @@ -166,7 +166,7 @@ add_boost_tree_lightgbm <- function() { parsnip::set_model_arg( model = "boost_tree", eng = "lightgbm", - parsnip = "sample_size", + parsnip = "sample_prop", original = "bagging_fraction", func = list(pkg = "dials", fun = "sample_size"), has_submodel = FALSE From 722c8df3080e28fe0a64053db2ecea6fa4d7d659 Mon Sep 17 00:00:00 2001 From: tonyk7440 Date: Tue, 29 Dec 2020 15:19:13 +0000 Subject: [PATCH 3/3] remove verbosity to avoid actions warning error --- tests/testthat/helper-model.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testthat/helper-model.R b/tests/testthat/helper-model.R index ccd7fb9..cfa8f36 100644 --- a/tests/testthat/helper-model.R +++ b/tests/testthat/helper-model.R @@ -5,7 +5,7 @@ mtcars_class_binary$vs <- as.factor(mtcars$vs) expect_all_modes_works <- function(model, engine) { if(engine == "lightgbm") { - model <- parsnip::set_engine(model, engine, verbosity = -1L) + model <- parsnip::set_engine(model, engine) } else { model <- parsnip::set_engine(model, engine) }