Skip to content

Commit

Permalink
don't compare fit_times in test
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpcouch committed Aug 2, 2024
1 parent 6379d85 commit f63797d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Imports:
glue,
hardhat (>= 1.2.0),
lifecycle (>= 1.0.0),
parsnip (>= 1.2.0),
parsnip (>= 1.2.1),
pillar (>= 1.7.0),
prettyunits,
purrr,
Expand All @@ -48,7 +48,7 @@ Suggests:
kknn,
knitr,
modeldata,
recipes (>= 1.0.0),
recipes (>= 1.1.0),
rmarkdown,
spelling,
testthat (>= 3.0.0),
Expand Down
4 changes: 4 additions & 0 deletions tests/testthat/test-fit_best.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ test_that("fit_best fits with correct hyperparameters", {
tune_params <- select_best(tune_res, metric = "rmse")
manual_wf <- fit_best(tune_res, parameters = tune_params)

manual_wf$pre$mold$blueprint$recipe$fit_times <-
fit_best_wf$pre$mold$blueprint$recipe$fit_times
expect_equal(manual_wf, fit_best_wf)

# metric: iic
Expand All @@ -49,6 +51,8 @@ test_that("fit_best fits with correct hyperparameters", {
tune_params_2 <- select_best(tune_res_2, metric = "iic")
manual_wf_2 <- fit_best(tune_res_2, parameters = tune_params_2)

manual_wf_2$pre$mold$blueprint$recipe$fit_times <-
fit_best_wf_2$pre$mold$blueprint$recipe$fit_times
expect_equal(manual_wf_2, fit_best_wf_2)
})

Expand Down

0 comments on commit f63797d

Please sign in to comment.