diff --git a/tests/testthat/_snaps/survival-tune-sa.md b/tests/testthat/_snaps/survival-tune-sa.md index c4cda6e..cdc266c 100644 --- a/tests/testthat/_snaps/survival-tune-sa.md +++ b/tests/testthat/_snaps/survival-tune-sa.md @@ -14,6 +14,15 @@ Code expect_snapshot_plot(print(autoplot(sa_dynamic_res)), "dyn-sa") +--- + + Code + expect_snapshot_plot(print(autoplot(sa_dynamic_res, eval_time = 1, type = "parameters")), + "dyn-sa-param") + Condition + Warning: + `eval_time` is not used with `autoplot(..., type = 'parameters')`. + # sim annealing tuning survival models with mixture of metric types Code @@ -30,6 +39,15 @@ Code expect_snapshot_plot(print(autoplot(sa_mixed_res)), "mix-sa-0-times") +--- + + Code + expect_snapshot_plot(print(autoplot(sa_mixed_res, eval_time = 1, type = "parameters")), + "mix-sa-param") + Condition + Warning: + `eval_time` is not used with `autoplot(..., type = 'parameters')`. + --- Code diff --git a/tests/testthat/test-stacks-tuning.R b/tests/testthat/test-stacks-tuning.R index 3abc631..dc4f3de 100644 --- a/tests/testthat/test-stacks-tuning.R +++ b/tests/testthat/test-stacks-tuning.R @@ -44,15 +44,10 @@ spec_lr <- set_mode("regression") spec_bt <- - boost_tree(mtry = tune(), min_n = tune()) %>% + boost_tree(learn_rate = tune(), min_n = tune()) %>% set_engine("xgboost") %>% set_mode("regression") -spec_dt <- - decision_tree(cost_complexity = tune(), tree_depth = tune()) %>% - set_engine("rpart") %>% - set_mode("regression") - spec_svm <- svm_linear(cost = tune(), margin = tune()) %>% set_engine("LiblineaR") %>% @@ -61,7 +56,7 @@ spec_svm <- wf_set <- workflow_set( preproc = list(rec = base_rec), - models = list(lr = spec_lr, bt = spec_bt, dt = spec_dt, svm = spec_svm), + models = list(lr = spec_lr, bt = spec_bt, svm = spec_svm), cross = TRUE ) diff --git a/tests/testthat/test-survival-tune-sa.R b/tests/testthat/test-survival-tune-sa.R index 54e8a4c..000ef38 100644 --- a/tests/testthat/test-survival-tune-sa.R +++ b/tests/testthat/test-survival-tune-sa.R @@ -434,9 +434,11 @@ test_that("sim annealing tuning survival models with dynamic metric", { "dyn-sa" ) ) - expect_snapshot_plot( - print(autoplot(sa_dynamic_res, eval_time = 1, type = "parameters")), - "dyn-sa-param" + expect_snapshot( + expect_snapshot_plot( + print(autoplot(sa_dynamic_res, eval_time = 1, type = "parameters")), + "dyn-sa-param" + ) ) expect_snapshot_plot( print(autoplot(sa_dynamic_res, eval_time = 10, type = "performance")), @@ -625,9 +627,11 @@ test_that("sim annealing tuning survival models with mixture of metric types", { "mix-sa-0-times" ) ) - expect_snapshot_plot( - print(autoplot(sa_mixed_res, eval_time = 1, type = "parameters")), - "mix-sa-param" + expect_snapshot( + expect_snapshot_plot( + print(autoplot(sa_mixed_res, eval_time = 1, type = "parameters")), + "mix-sa-param" + ) ) expect_snapshot_plot( print(autoplot(sa_mixed_res, eval_time = 10, type = "performance")),