Skip to content

Commit 75e6cdc

Browse files
Update stacks column names for new tune (#262)
Co-authored-by: Emil Hvitfeldt <emilhhvitfeldt@gmail.com>
1 parent ffe3e99 commit 75e6cdc

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

tests/testthat/test-stacks-columns.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ library(dplyr)
1616
test_that("stacks can accommodate outcome levels that are not valid colnames", {
1717
# skip on pre-0.2.4
1818
skip_if(utils::packageVersion("stacks") < "0.2.3.9001")
19+
skip_if_not_installed("tune", "1.3.0.9006")
1920

2021
data("penguins")
2122

@@ -40,7 +41,7 @@ test_that("stacks can accommodate outcome levels that are not valid colnames", {
4041
)
4142

4243
expect_true(inherits(data_st, "data_stack"))
43-
expect_true(".pred_Adelie.1_tuned_1_1" %in% colnames(data_st))
44+
expect_true(".pred_Adelie.1_tunedpre0_mod2_post0" %in% colnames(data_st))
4445

4546
# glmnet will likely present warnings
4647
suppressMessages(

tests/testthat/test-stacks-tuning.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ test_that("stacking with finetune works (anova)", {
190190
dplyr::rowwise() %>%
191191
dplyr::mutate(
192192
.config = gsub("Preprocessor|Model", "", .config),
193-
col_name = paste(wflow_id, .config, sep = "_")
193+
col_name = paste(wflow_id, .config, sep = "")
194194
) %>%
195195
pull(col_name)
196196

0 commit comments

Comments
 (0)