diff --git a/NEWS.md b/NEWS.md index 6e35a85..6e5d38d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -7,6 +7,7 @@ ## Bugfixes +* Adapt `tune::finalize_workflow()` test to {parsnip} v1.2 breaking change. (#155) * `autoplot()` now position the "has_checkpoint" points correctly when a `tabnet_fit()` is continuing a previous training using `tabnet_model =`. (#150) * Explicitely warn that `tabnet_model` option will not be used in `tabnet_pretrain()` tasks. (#150) diff --git a/tests/testthat/test-parsnip.R b/tests/testthat/test-parsnip.R index bcd89da..742281e 100644 --- a/tests/testthat/test-parsnip.R +++ b/tests/testthat/test-parsnip.R @@ -116,7 +116,7 @@ test_that("Check we can finalize a workflow from a tune_grid", { control = tune::control_grid(verbose = F) ) - best_rmse <- tune::select_best(at, "rmse") + best_rmse <- tune::select_best(at, metric = "rmse") expect_no_error( final_wf <- tune::finalize_workflow(wf, best_rmse) diff --git a/tests/testthat/test-plot.R b/tests/testthat/test-plot.R index 1790024..f5bd125 100644 --- a/tests/testthat/test-plot.R +++ b/tests/testthat/test-plot.R @@ -60,8 +60,9 @@ test_that("Autoplot of pretrain then fit scenario, pretrain without checkpoints, print(autoplot(fit_no_checkpoint)) ) fit_with_checkpoint <- tabnet_fit(Sale_Price ~., data = small_ames, tabnet_model = fit_no_checkpoint, epochs = 2, checkpoint_epoch = 1) - expect_no_error( - print(autoplot(fit_with_checkpoint)) + expect_warning( + print(autoplot(fit_with_checkpoint)), + "Removed 2 rows containing missing values" ) })