Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transition from add_tailor(prop) and method #945

Merged
merged 3 commits into from
Oct 1, 2024
Merged

Conversation

simonpcouch
Copy link
Contributor

@simonpcouch simonpcouch commented Sep 30, 2024

Updates related to tidymodels/workflows#262 -- transitions away from the prop and method arguments to add_tailor() to a separate argument for the calibration set and uses the renamed helpers from workflows.

@@ -178,8 +176,20 @@ test_that("can use `fit_resamples()` with a workflow - postprocessor (requires t
seed <- generate_seeds(TRUE, 1)[[1]]
old_kind <- RNGkind()[[1]]
assign(".Random.seed", seed, envir = globalenv())
withr::defer(RNGkind(kind = old_kind))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An RNG state oddity—without it, tests elsewhere in the test suite begin failing with RNG changes.

@@ -201,7 +211,7 @@ test_that("can use `fit_resamples()` with a workflow - postprocessor (no trainin
parsnip::linear_reg()
) %>%
workflows::add_tailor(
tailor::tailor("regression") %>% tailor::adjust_numeric_range(lower_limit = 1)
tailor::tailor() %>% tailor::adjust_numeric_range(lower_limit = 1)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the deprecated type argument in tailor code I was editing and went ahead and did it in the last remaining couple places.

wflow_preds <- predict(wflow_res, rsample::assessment(split))

expect_equal(last_fit_preds[".pred"], wflow_preds)
})

test_that("can use `last_fit()` with a workflow - postprocessor (requires training)", {
test_that("can use `last_fit()` with a workflow - postprocessor (does not require training)", {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This tests the same thing it used to—it was just previously mislabeled.

@simonpcouch simonpcouch merged commit f8d734a into main Oct 1, 2024
11 checks passed
@simonpcouch simonpcouch deleted the workflow-calibration branch October 1, 2024 12:51
Copy link

This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant