Skip to content

Commit

Permalink
Update snapshots for "eval_time not needed" warnings (#199)
Browse files Browse the repository at this point in the history
* update snapshots

* temporarily use branch/PR

* PR merged

* more updates
  • Loading branch information
hfrick authored Feb 21, 2024
1 parent 234783d commit def7031
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/survival-fit-resamples.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
metrics = stc_mtrc, control = rsctrl, eval_time = time_points)
Condition
Warning in `fit_resamples()`:
Evaluation times are only required when dynamic or integrated metrics are used (and will be ignored here).
`eval_time` is only used for dynamic or integrated survival metrics.

# resampling survival models mixture of metric types

Expand Down
8 changes: 4 additions & 4 deletions tests/testthat/_snaps/survival-tune-autoplot.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
10, 15))
Condition
Warning:
Evaluation times are not required with `autoplot(..., type = 'parameters')`.
`eval_time` is not used with `autoplot(..., type = 'parameters')`.

# autoplot-ting survival models with different metric types

Expand All @@ -36,21 +36,21 @@
10, 15))
Condition
Warning:
Evaluation times are not required with `autoplot(..., type = 'parameters')`.
`eval_time` is not used with `autoplot(..., type = 'parameters')`.

# autoplot() warning for unneeded evaluation times

Code
p1 <- autoplot(tune_res, eval_time = 10, metric = "concordance_survival")
Condition
Warning in `autoplot()`:
Evaluation times are only required when the results of a dynamic survival metric are being visualized (and will be ignored).
`eval_time` is only used for dynamic survival metrics.

---

Code
p2 <- autoplot(tune_res, eval_time = 10, metric = "brier_survival_integrated")
Condition
Warning in `autoplot()`:
Evaluation times are only required when the results of a dynamic survival metric are being visualized (and will be ignored).
`eval_time` is only used for dynamic survival metrics.

6 changes: 3 additions & 3 deletions tests/testthat/_snaps/survival-tune-select.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
select_best(grid_static_res, metric = "concordance_survival", eval_time = 0)
Condition
Warning in `select_best()`:
An evaluation time is only required when a dynamic metric is selected (and `eval_time` will thus be ignored).
`eval_time` is only used for dynamic survival metrics.
Output
# A tibble: 1 x 2
penalty .config
Expand Down Expand Up @@ -92,7 +92,7 @@
eval_time = 0)
Condition
Warning in `select_best()`:
An evaluation time is only required when a dynamic metric is selected (and `eval_time` will thus be ignored).
`eval_time` is only used for dynamic survival metrics.
Output
# A tibble: 1 x 2
penalty .config
Expand Down Expand Up @@ -228,7 +228,7 @@
select_best(grid_mixed_res, metric = "brier_survival_integrated", eval_time = 0)
Condition
Warning in `select_best()`:
An evaluation time is only required when a dynamic metric is selected (and `eval_time` will thus be ignored).
`eval_time` is only used for dynamic survival metrics.
Output
# A tibble: 1 x 2
penalty .config
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/_snaps/survival-tune-show-best.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
show_best(race_stc_res, metric = "concordance_survival", eval_time = 1)
Condition
Warning in `show_best()`:
An evaluation time is only required when a dynamic metric is selected (and `eval_time` will thus be ignored).
`eval_time` is only used for dynamic survival metrics.
Output
# A tibble: 1 x 7
cost_complexity .metric .estimator mean n std_err .config
Expand Down Expand Up @@ -106,7 +106,7 @@
show_best(race_stc_res, metric = "concordance_survival", eval_time = 1)
Condition
Warning in `show_best()`:
An evaluation time is only required when a dynamic metric is selected (and `eval_time` will thus be ignored).
`eval_time` is only used for dynamic survival metrics.
Output
# A tibble: 5 x 8
cost_complexity .metric .estimator .eval_time mean n std_err .config
Expand Down
6 changes: 3 additions & 3 deletions tests/testthat/_snaps/survival-tune_race_anova.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
eval_time = 5) %>% pluck("cost_complexity") %>% unique()
Condition
Warning in `show_best()`:
An evaluation time is only required when a dynamic metric is selected (and `eval_time` will thus be ignored).
`eval_time` is only used for dynamic survival metrics.

# race tuning (anova) survival models with dynamic metrics

Expand Down Expand Up @@ -101,7 +101,7 @@
eval_time = 10)
Condition
Warning in `tune_race_anova()`:
Evaluation times are only required when the model mode is "censored regression" (and will be ignored).
`eval_time` is only used for models with mode "censored regression".

---

Expand All @@ -111,5 +111,5 @@
concordance_survival), eval_time = 10)
Condition
Warning in `tune_race_anova()`:
Evaluation times are only required when dynamic or integrated metrics are used (and will be ignored here).
`eval_time` is only used for dynamic or integrated survival metrics.

6 changes: 3 additions & 3 deletions tests/testthat/_snaps/survival-tune_race_win_loss.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
eval_time = 5) %>% pluck("cost_complexity") %>% unique()
Condition
Warning in `show_best()`:
An evaluation time is only required when a dynamic metric is selected (and `eval_time` will thus be ignored).
`eval_time` is only used for dynamic survival metrics.

# race tuning (win_loss) survival models with dynamic metrics

Expand Down Expand Up @@ -123,7 +123,7 @@
rmse), eval_time = 10)
Condition
Warning in `tune_race_win_loss()`:
Evaluation times are only required when the model mode is "censored regression" (and will be ignored).
`eval_time` is only used for models with mode "censored regression".

---

Expand All @@ -133,5 +133,5 @@
concordance_survival), eval_time = 10)
Condition
Warning in `tune_race_win_loss()`:
Evaluation times are only required when dynamic or integrated metrics are used (and will be ignored here).
`eval_time` is only used for dynamic or integrated survival metrics.

2 changes: 1 addition & 1 deletion tests/testthat/test-survival-fit-resamples.R
Original file line number Diff line number Diff line change
Expand Up @@ -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.9012")
skip_if_not_installed("tune", minimum_version = "1.1.2.9020")
skip_if_not_installed("yardstick", minimum_version = "1.2.0.9001")

test_that("resampling survival models with static metric", {
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-survival-tune-autoplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ 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.2.9018")
skip_if_not_installed("tune", minimum_version = "1.1.2.9020")
skip_if_not_installed("yardstick", minimum_version = "1.2.0.9001")
skip_if_not_installed("finetune", minimum_version = "1.1.0.9005")

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-survival-tune-select.R
Original file line number Diff line number Diff line change
Expand Up @@ -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.9014")
skip_if_not_installed("tune", minimum_version = "1.1.2.9020")
skip_if_not_installed("yardstick", minimum_version = "1.2.0.9001")

test_that("select_*() with static metric", {
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-survival-tune-show-best.R
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ test_that("show_best with censored data - dynamic metric - bayes", {
test_that("show_best with censored data - static metric - anova racing", {

skip_if_not_installed("parsnip", minimum_version = "1.1.1.9007")
skip_if_not_installed("tune", minimum_version = "1.1.2.9012")
skip_if_not_installed("tune", minimum_version = "1.1.2.9020")
skip_if_not_installed("finetune", minimum_version = "1.1.0.9004")

obj <- make_churn_cens_objects()
Expand Down Expand Up @@ -143,7 +143,7 @@ test_that("show_best with censored data - static metric - anova racing", {
test_that("show_best with censored data - static metric (+dyn) - W/L racing", {

skip_if_not_installed("parsnip", minimum_version = "1.1.1.9007")
skip_if_not_installed("tune", minimum_version = "1.1.2.9012")
skip_if_not_installed("tune", minimum_version = "1.1.2.9020")
skip_if_not_installed("finetune", minimum_version = "1.1.0.9004")

obj <- make_churn_cens_objects()
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-survival-tune_race_anova.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ 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.2.9012")
skip_if_not_installed("tune", minimum_version = "1.1.2.9020")
skip_if_not_installed("yardstick", minimum_version = "1.2.0.9001")
skip_if_not_installed("finetune", minimum_version = "1.1.0.9005")

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-survival-tune_race_win_loss.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ 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.2.9012")
skip_if_not_installed("tune", minimum_version = "1.1.2.9020")
skip_if_not_installed("yardstick", minimum_version = "1.2.0.9001")
skip_if_not_installed("finetune", minimum_version = "1.1.0.9006")

Expand Down

0 comments on commit def7031

Please sign in to comment.