diff --git a/tests/testthat/_snaps/survival-tune-bayes.md b/tests/testthat/_snaps/survival-tune-bayes.md index e01fb3a..77f14a6 100644 --- a/tests/testthat/_snaps/survival-tune-bayes.md +++ b/tests/testthat/_snaps/survival-tune-bayes.md @@ -1,7 +1,3 @@ -# Bayesian tuning survival models with integrated metric - - Evaluation times are only required when dynmanic or integrated metrics are selected as the primary metric (and will be ignored). - # Bayesian tuning survival models with dynamic metric 4 evaluation times were specified during tuning; the first (10) will be used. diff --git a/tests/testthat/_snaps/survival-tune-sa.md b/tests/testthat/_snaps/survival-tune-sa.md index aca7260..07ad40b 100644 --- a/tests/testthat/_snaps/survival-tune-sa.md +++ b/tests/testthat/_snaps/survival-tune-sa.md @@ -1,7 +1,3 @@ -# sim annealing tuning survival models with integrated metric - - Evaluation times are only required when dynmanic or integrated metrics are selected as the primary metric (and will be ignored). - # sim annealing tuning survival models with dynamic metric 4 evaluation times were specified during tuning; the first (10) will be used. diff --git a/tests/testthat/_snaps/survival-tune_race_anova.md b/tests/testthat/_snaps/survival-tune_race_anova.md index 351a914..a9592e0 100644 --- a/tests/testthat/_snaps/survival-tune_race_anova.md +++ b/tests/testthat/_snaps/survival-tune_race_anova.md @@ -2,18 +2,10 @@ Evaluation times are only required when dynmanic or integrated metrics are selected as the primary metric (and will be ignored). ---- - - Evaluation times are only required when dynmanic or integrated metrics are selected as the primary metric (and will be ignored). - # race tuning (anova) survival models with dynamic metrics 4 evaluation times were specified during tuning; the first (10) will be used. ---- - - No evaluation time was set; a value of 5 was used. - # race tuning (anova) survival models with mixture of metric types 4 evaluation times were specified during tuning; the first (10) will be used. diff --git a/tests/testthat/_snaps/survival-tune_race_anova/dyn-aov-race-0-times.png b/tests/testthat/_snaps/survival-tune_race_anova/dyn-aov-race-0-times.png deleted file mode 100644 index 8bea492..0000000 Binary files a/tests/testthat/_snaps/survival-tune_race_anova/dyn-aov-race-0-times.png and /dev/null differ diff --git a/tests/testthat/_snaps/survival-tune_race_anova/dyn-aov-race-2-times.png b/tests/testthat/_snaps/survival-tune_race_anova/dyn-aov-race-2-times.png deleted file mode 100644 index bcc2445..0000000 Binary files a/tests/testthat/_snaps/survival-tune_race_anova/dyn-aov-race-2-times.png and /dev/null differ diff --git a/tests/testthat/_snaps/survival-tune_race_win_loss.md b/tests/testthat/_snaps/survival-tune_race_win_loss.md index 0720cbb..1281a09 100644 --- a/tests/testthat/_snaps/survival-tune_race_win_loss.md +++ b/tests/testthat/_snaps/survival-tune_race_win_loss.md @@ -2,10 +2,6 @@ Evaluation times are only required when dynmanic or integrated metrics are selected as the primary metric (and will be ignored). ---- - - Evaluation times are only required when dynmanic or integrated metrics are selected as the primary metric (and will be ignored). - # race tuning (win_loss) survival models with dynamic metrics 4 evaluation times were specified during tuning; the first (10) will be used. diff --git a/tests/testthat/test-survival-fit-resamples.R b/tests/testthat/test-survival-fit-resamples.R index c7e8483..1a45781 100644 --- a/tests/testthat/test-survival-fit-resamples.R +++ b/tests/testthat/test-survival-fit-resamples.R @@ -4,7 +4,7 @@ suppressPackageStartupMessages(library(baguette)) skip_if_not_installed("parsnip", minimum_version = "1.1.0.9003") skip_if_not_installed("censored", minimum_version = "0.2.0.9000") -skip_if_not_installed("tune", minimum_version = "1.1.2.9009") +skip_if_not_installed("tune", minimum_version = "1.1.2.9010") skip_if_not_installed("yardstick", minimum_version = "1.2.0.9001") test_that("resampling survival models with static metric", { diff --git a/tests/testthat/test-survival-last-fit.R b/tests/testthat/test-survival-last-fit.R index 126bbfd..0f7034c 100644 --- a/tests/testthat/test-survival-last-fit.R +++ b/tests/testthat/test-survival-last-fit.R @@ -3,7 +3,7 @@ suppressPackageStartupMessages(library(censored)) skip_if_not_installed("parsnip", minimum_version = "1.1.0.9003") skip_if_not_installed("censored", minimum_version = "0.2.0.9000") -skip_if_not_installed("tune", minimum_version = "1.1.2.9009") +skip_if_not_installed("tune", minimum_version = "1.1.2.9010") skip_if_not_installed("yardstick", minimum_version = "1.2.0.9001") test_that("last fit for survival models with static metric", { diff --git a/tests/testthat/test-survival-tune-bayes.R b/tests/testthat/test-survival-tune-bayes.R index bb03502..ad1c7c9 100644 --- a/tests/testthat/test-survival-tune-bayes.R +++ b/tests/testthat/test-survival-tune-bayes.R @@ -3,7 +3,7 @@ suppressPackageStartupMessages(library(censored)) skip_if_not_installed("parsnip", minimum_version = "1.1.0.9003") skip_if_not_installed("censored", minimum_version = "0.2.0.9000") -skip_if_not_installed("tune", minimum_version = "1.1.2.9009") +skip_if_not_installed("tune", minimum_version = "1.1.2.9010") skip_if_not_installed("yardstick", minimum_version = "1.2.0.9001") test_that("Bayesian tuning survival models with static metric", { @@ -185,7 +185,6 @@ test_that("Bayesian tuning survival models with integrated metric", { control = gctrl ) - expect_snapshot_warning({ set.seed(2193) bayes_integrated_res <- mod_spec %>% @@ -198,7 +197,6 @@ test_that("Bayesian tuning survival models with integrated metric", { control = bctrl, initial = init_grid_integrated_res ) - }) # test structure of results -------------------------------------------------- diff --git a/tests/testthat/test-survival-tune-eval-time-attribute.R b/tests/testthat/test-survival-tune-eval-time-attribute.R index 5d62f64..37e8f24 100644 --- a/tests/testthat/test-survival-tune-eval-time-attribute.R +++ b/tests/testthat/test-survival-tune-eval-time-attribute.R @@ -4,8 +4,8 @@ suppressPackageStartupMessages(library(finetune)) skip_if_not_installed("parsnip", minimum_version = "1.1.0.9003") skip_if_not_installed("censored", minimum_version = "0.2.0.9000") -skip_if_not_installed("tune", minimum_version = "1.1.1.9002") -skip_if_not_installed("finetune", minimum_version = "1.1.0.9003") +skip_if_not_installed("tune", minimum_version = "1.1.2.9010") +skip_if_not_installed("finetune", minimum_version = "1.1.0.9005") test_that("fit_resamples save eval_time", { diff --git a/tests/testthat/test-survival-tune-grid.R b/tests/testthat/test-survival-tune-grid.R index 443bb1c..85c4582 100644 --- a/tests/testthat/test-survival-tune-grid.R +++ b/tests/testthat/test-survival-tune-grid.R @@ -3,7 +3,7 @@ suppressPackageStartupMessages(library(censored)) skip_if_not_installed("parsnip", minimum_version = "1.1.0.9003") skip_if_not_installed("censored", minimum_version = "0.2.0.9000") -skip_if_not_installed("tune", minimum_version = "1.1.2.9009") +skip_if_not_installed("tune", minimum_version = "1.1.2.9010") skip_if_not_installed("yardstick", minimum_version = "1.2.0.9001") test_that("grid tuning survival models with static metric", { diff --git a/tests/testthat/test-survival-tune-sa.R b/tests/testthat/test-survival-tune-sa.R index a528911..3747495 100644 --- a/tests/testthat/test-survival-tune-sa.R +++ b/tests/testthat/test-survival-tune-sa.R @@ -2,12 +2,11 @@ suppressPackageStartupMessages(library(tidymodels)) suppressPackageStartupMessages(library(censored)) suppressPackageStartupMessages(library(finetune)) -skip_if_not_installed("finetune", minimum_version = "1.1.0.9001") skip_if_not_installed("parsnip", minimum_version = "1.1.0.9003") skip_if_not_installed("censored", minimum_version = "0.2.0.9000") -skip_if_not_installed("tune", minimum_version = "1.1.2.9009") +skip_if_not_installed("tune", minimum_version = "1.1.2.9010") skip_if_not_installed("yardstick", minimum_version = "1.2.0.9001") -skip_if_not_installed("finetune", minimum_version = "1.1.0.9001") +skip_if_not_installed("finetune", minimum_version = "1.1.0.9005") test_that("sim annealing tuning survival models with static metric", { skip_if_not_installed("mboost") @@ -200,22 +199,19 @@ test_that("sim annealing tuning survival models with integrated metric", { control = gctrl ) - expect_snapshot_warning({ - set.seed(2193) - sa_integrated_res <- - mod_spec %>% - tune_sim_anneal( - event_time ~ X1 + X2, - resamples = sim_rs, - iter = 2, - param_info = mod_param, - metrics = sint_mtrc, - eval_time = time_points, - control = sctrl, - initial = init_grid_integrated_res - ) - }) - + set.seed(2193) + sa_integrated_res <- + mod_spec %>% + tune_sim_anneal( + event_time ~ X1 + X2, + resamples = sim_rs, + iter = 2, + param_info = mod_param, + metrics = sint_mtrc, + eval_time = time_points, + control = sctrl, + initial = init_grid_integrated_res + ) # test structure of results -------------------------------------------------- diff --git a/tests/testthat/test-survival-tune_race_anova.R b/tests/testthat/test-survival-tune_race_anova.R index 18ae94d..193a6c7 100644 --- a/tests/testthat/test-survival-tune_race_anova.R +++ b/tests/testthat/test-survival-tune_race_anova.R @@ -2,10 +2,9 @@ suppressPackageStartupMessages(library(tidymodels)) suppressPackageStartupMessages(library(censored)) suppressPackageStartupMessages(library(finetune)) -skip_if_not_installed("finetune", minimum_version = "1.1.0.9001") skip_if_not_installed("parsnip", minimum_version = "1.1.0.9003") skip_if_not_installed("censored", minimum_version = "0.2.0.9000") -skip_if_not_installed("tune", minimum_version = "1.1.2.9009") +skip_if_not_installed("tune", minimum_version = "1.1.2.9010") skip_if_not_installed("yardstick", minimum_version = "1.2.0.9001") skip_if_not_installed("finetune", minimum_version = "1.1.0.9005") @@ -179,19 +178,17 @@ test_that("race tuning (anova) survival models with integrated metric", { sint_mtrc <- metric_set(brier_survival_integrated) - expect_snapshot_warning({ - set.seed(2193) - aov_integrated_res <- - mod_spec %>% - tune_race_anova( - event_time ~ X1 + X2, - resamples = sim_rs, - grid = grid, - metrics = sint_mtrc, - eval_time = time_points, - control = rctrl - ) - }) + set.seed(2193) + aov_integrated_res <- + mod_spec %>% + tune_race_anova( + event_time ~ X1 + X2, + resamples = sim_rs, + grid = grid, + metrics = sint_mtrc, + eval_time = time_points, + control = rctrl + ) expect_snapshot_warning({ num_final_aov <- @@ -404,18 +401,6 @@ test_that("race tuning (anova) survival models with dynamic metrics", { "dyn-aov-race-plot" ) - expect_snapshot_plot( - print(autoplot(aov_dyn_res, eval_time = c(1, 5))), - "dyn-aov-race-2-times" - ) - - expect_snapshot_warning( - expect_snapshot_plot( - print(autoplot(aov_dyn_res)), - "dyn-aov-race-0-times" - ) - ) - # test metric collection ----------------------------------------------------- exp_metric_sum <- tibble( diff --git a/tests/testthat/test-survival-tune_race_win_loss.R b/tests/testthat/test-survival-tune_race_win_loss.R index 781ae52..99772b6 100644 --- a/tests/testthat/test-survival-tune_race_win_loss.R +++ b/tests/testthat/test-survival-tune_race_win_loss.R @@ -2,10 +2,9 @@ suppressPackageStartupMessages(library(tidymodels)) suppressPackageStartupMessages(library(censored)) suppressPackageStartupMessages(library(finetune)) -skip_if_not_installed("finetune", minimum_version = "1.1.0.9001") skip_if_not_installed("parsnip", minimum_version = "1.1.0.9003") skip_if_not_installed("censored", minimum_version = "0.2.0.9000") -skip_if_not_installed("tune", minimum_version = "1.1.2.9009") +skip_if_not_installed("tune", minimum_version = "1.1.2.9010") skip_if_not_installed("yardstick", minimum_version = "1.2.0.9001") skip_if_not_installed("finetune", minimum_version = "1.1.0.9005") @@ -177,19 +176,17 @@ test_that("race tuning (win_loss) survival models with integrated metric", { sint_mtrc <- metric_set(brier_survival_integrated) - expect_snapshot_warning({ - set.seed(2193) - wl_integrated_res <- - mod_spec %>% - tune_race_win_loss( - event_time ~ X1 + X2, - resamples = sim_rs, - grid = grid, - metrics = sint_mtrc, - eval_time = time_points, - control = rctrl - ) - }) + set.seed(2193) + wl_integrated_res <- + mod_spec %>% + tune_race_win_loss( + event_time ~ X1 + X2, + resamples = sim_rs, + grid = grid, + metrics = sint_mtrc, + eval_time = time_points, + control = rctrl + ) expect_snapshot_warning({ num_final_wl <-