Skip to content

Commit 96fea81

Browse files
committed
small testing updates
1 parent 99596ce commit 96fea81

File tree

3 files changed

+17
-83
lines changed

3 files changed

+17
-83
lines changed

tests/testthat/_snaps/bayes.md

Lines changed: 14 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@
169169
control = control_bayes(verbose_iter = TRUE))
170170
Message
171171
Optimizing rmse using the expected improvement
172-
172+
173173
-- Iteration 1 -----------------------------------------------------------------
174174
175175
i Current best: rmse=2.418 (@iter 0)
@@ -523,68 +523,28 @@
523523
Bldg_Type + Latitude + Longitude, resamples = folds, initial = 3, metrics = yardstick::metric_set(
524524
rsq), param_info = parameters(dials::cost_complexity(c(-2, 0))))
525525
Message
526-
! validation: internal:
527-
There was 1 warning in `dplyr::summarise()`.
528-
i In argument: `.estimate = metric_fn(truth = Sale_Price, estimate = ....
529-
i In group 1: `cost_complexity = 0.9998726`.
530-
Caused by warning:
531-
! A correlation computation is required, but `estimate` is constant an...
526+
! validation: internal: A correlation computation is required, but `estimate` is constant and ha...
532527
! For the rsq estimates, 1 missing value was found and removed before fitting
533528
the Gaussian process model.
534-
! validation: internal:
535-
There was 1 warning in `dplyr::summarise()`.
536-
i In argument: `.estimate = metric_fn(truth = Sale_Price, estimate = ....
537-
i In group 1: `cost_complexity = 0.9995734`.
538-
Caused by warning:
539-
! A correlation computation is required, but `estimate` is constant an...
529+
! validation: internal: A correlation computation is required, but `estimate` is constant and ha...
540530
! For the rsq estimates, 2 missing values were found and removed before
541531
fitting the Gaussian process model.
542-
! validation: internal:
543-
There was 1 warning in `dplyr::summarise()`.
544-
i In argument: `.estimate = metric_fn(truth = Sale_Price, estimate = ....
545-
i In group 1: `cost_complexity = 0.9995`.
546-
Caused by warning:
547-
! A correlation computation is required, but `estimate` is constant an...
532+
! validation: internal: A correlation computation is required, but `estimate` is constant and ha...
548533
! For the rsq estimates, 3 missing values were found and removed before
549534
fitting the Gaussian process model.
550-
! validation: internal:
551-
There was 1 warning in `dplyr::summarise()`.
552-
i In argument: `.estimate = metric_fn(truth = Sale_Price, estimate = ....
553-
i In group 1: `cost_complexity = 0.9992439`.
554-
Caused by warning:
555-
! A correlation computation is required, but `estimate` is constant an...
535+
! validation: internal: A correlation computation is required, but `estimate` is constant and ha...
556536
! For the rsq estimates, 4 missing values were found and removed before
557537
fitting the Gaussian process model.
558-
! validation: internal:
559-
There was 1 warning in `dplyr::summarise()`.
560-
i In argument: `.estimate = metric_fn(truth = Sale_Price, estimate = ....
561-
i In group 1: `cost_complexity = 0.9996399`.
562-
Caused by warning:
563-
! A correlation computation is required, but `estimate` is constant an...
538+
! validation: internal: A correlation computation is required, but `estimate` is constant and ha...
564539
! For the rsq estimates, 5 missing values were found and removed before
565540
fitting the Gaussian process model.
566-
! validation: internal:
567-
There was 1 warning in `dplyr::summarise()`.
568-
i In argument: `.estimate = metric_fn(truth = Sale_Price, estimate = ....
569-
i In group 1: `cost_complexity = 0.9994867`.
570-
Caused by warning:
571-
! A correlation computation is required, but `estimate` is constant an...
541+
! validation: internal: A correlation computation is required, but `estimate` is constant and ha...
572542
! For the rsq estimates, 6 missing values were found and removed before
573543
fitting the Gaussian process model.
574-
! validation: internal:
575-
There was 1 warning in `dplyr::summarise()`.
576-
i In argument: `.estimate = metric_fn(truth = Sale_Price, estimate = ....
577-
i In group 1: `cost_complexity = 0.9997809`.
578-
Caused by warning:
579-
! A correlation computation is required, but `estimate` is constant an...
544+
! validation: internal: A correlation computation is required, but `estimate` is constant and ha...
580545
! For the rsq estimates, 7 missing values were found and removed before
581546
fitting the Gaussian process model.
582-
! validation: internal:
583-
There was 1 warning in `dplyr::summarise()`.
584-
i In argument: `.estimate = metric_fn(truth = Sale_Price, estimate = ....
585-
i In group 1: `cost_complexity = 0.9999164`.
586-
Caused by warning:
587-
! A correlation computation is required, but `estimate` is constant an...
547+
! validation: internal: A correlation computation is required, but `estimate` is constant and ha...
588548

589549
---
590550

@@ -595,36 +555,11 @@
595555
metrics = yardstick::metric_set(rsq), param_info = parameters(dials::cost_complexity(
596556
c(0.5, 0))))
597557
Message
598-
! validation: internal:
599-
There was 1 warning in `dplyr::summarise()`.
600-
i In argument: `.estimate = metric_fn(truth = Sale_Price, estimate = ....
601-
i In group 1: `cost_complexity = 1.95966`.
602-
Caused by warning:
603-
! A correlation computation is required, but `estimate` is constant an...
604-
! validation: internal:
605-
There was 1 warning in `dplyr::summarise()`.
606-
i In argument: `.estimate = metric_fn(truth = Sale_Price, estimate = ....
607-
i In group 1: `cost_complexity = 2.500534`.
608-
Caused by warning:
609-
! A correlation computation is required, but `estimate` is constant an...
610-
! validation: internal:
611-
There was 1 warning in `dplyr::summarise()`.
612-
i In argument: `.estimate = metric_fn(truth = Sale_Price, estimate = ....
613-
i In group 1: `cost_complexity = 1.263317`.
614-
Caused by warning:
615-
! A correlation computation is required, but `estimate` is constant an...
616-
! validation: internal:
617-
There was 1 warning in `dplyr::summarise()`.
618-
i In argument: `.estimate = metric_fn(truth = Sale_Price, estimate = ....
619-
i In group 1: `cost_complexity = 2.792327`.
620-
Caused by warning:
621-
! A correlation computation is required, but `estimate` is constant an...
622-
! validation: internal:
623-
There was 1 warning in `dplyr::summarise()`.
624-
i In argument: `.estimate = metric_fn(truth = Sale_Price, estimate = ....
625-
i In group 1: `cost_complexity = 1.224671`.
626-
Caused by warning:
627-
! A correlation computation is required, but `estimate` is constant an...
558+
! validation: internal: A correlation computation is required, but `estimate` is constant and ha...
559+
! validation: internal: A correlation computation is required, but `estimate` is constant and ha...
560+
! validation: internal: A correlation computation is required, but `estimate` is constant and ha...
561+
! validation: internal: A correlation computation is required, but `estimate` is constant and ha...
562+
! validation: internal: A correlation computation is required, but `estimate` is constant and ha...
628563
! All of the rsq estimates were missing. The Gaussian process model cannot be
629564
fit to the data.
630565
! Gaussian process model: no non-missing arguments to min; returning Inf, no non-missing arguments...

tests/testthat/_snaps/resample.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@
3939
Message
4040
x Fold1: preprocessor 1/1, model 1/1:
4141
Error in `check_outcome()`:
42-
! For a classification model, the outcome should be a factor.
42+
! For a classification model, the outcome should be a `factor`, not a ...
4343
x Fold2: preprocessor 1/1, model 1/1:
4444
Error in `check_outcome()`:
45-
! For a classification model, the outcome should be a factor.
45+
! For a classification model, the outcome should be a `factor`, not a ...
4646
Condition
4747
Warning:
4848
All models failed. Run `show_notes(.Last.tune.result)` for more information.

tests/testthat/test-resample.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,13 +221,12 @@ test_that("classification models generate correct error message", {
221221
expect_length(notes, 2L)
222222

223223
# Known failure in the recipe
224-
expect_true(all(grepl("outcome should be a factor", note)))
224+
expect_true(all(grepl("outcome should be a `factor`", note)))
225225

226226
expect_equal(extract, list(NULL, NULL))
227227
expect_equal(predictions, list(NULL, NULL))
228228
})
229229

230-
231230
# tune_grid() fallback ---------------------------------------------------------
232231

233232
test_that("`tune_grid()` falls back to `fit_resamples()` - formula", {

0 commit comments

Comments
 (0)