-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
throw better errors when method doesn't exists
- Loading branch information
1 parent
23ac50a
commit f7272a4
Showing
6 changed files
with
89 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# multiplication works | ||
|
||
Code | ||
orbital(wf_fit) | ||
Condition | ||
Error in `orbital()`: | ||
! A model of class <train.kknn> is not supported. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# multiplication works | ||
|
||
Code | ||
orbital(wf_fit) | ||
Condition | ||
Error in `orbital()`: | ||
! The recipe step `step_impute_knn()` is not supported. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
test_that("multiplication works", { | ||
skip_if_not_installed("recipes") | ||
skip_if_not_installed("parsnip") | ||
skip_if_not_installed("workflows") | ||
skip_if_not_installed("tidypredict") | ||
|
||
rec_spec <- recipes::recipe(mpg ~ ., data = mtcars) %>% | ||
recipes::step_normalize(recipes::all_numeric_predictors()) | ||
|
||
lm_spec <- parsnip::nearest_neighbor(mode = "regression") | ||
|
||
wf_spec <- workflows::workflow(rec_spec, lm_spec) | ||
|
||
wf_fit <- parsnip::fit(wf_spec, mtcars) | ||
|
||
expect_snapshot( | ||
error = TRUE, | ||
orbital(wf_fit) | ||
) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
test_that("multiplication works", { | ||
skip_if_not_installed("recipes") | ||
skip_if_not_installed("parsnip") | ||
skip_if_not_installed("workflows") | ||
skip_if_not_installed("tidypredict") | ||
|
||
rec_spec <- recipes::recipe(mpg ~ ., data = mtcars) %>% | ||
recipes::step_impute_knn(recipes::all_numeric_predictors()) | ||
|
||
lm_spec <- parsnip::linear_reg() | ||
|
||
wf_spec <- workflows::workflow(rec_spec, lm_spec) | ||
|
||
wf_fit <- parsnip::fit(wf_spec, mtcars) | ||
|
||
expect_snapshot( | ||
error = TRUE, | ||
orbital(wf_fit) | ||
) | ||
}) |