You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m very much appreciating recipes pointing out which step errors occurred in following #1069. We unfortunately don’t get the benefits of those changes in tune (and possibly other packages that need to catch and rethrow errors from recipes, see tidymodels/tune#599), as dispatch falls back to the rlang_error method for conditionMessage():
library(recipes)
data("ames", package="modeldata")
err<- try(
recipe(~., data=ames) |>
step_novel(Neighborhood, new_level="Gilbert") |>
prep()
)
#> Error in step_novel() : #> Caused by error in `prep()`:#> ! Columns already contain the new level: Neighborhooderr_cnd<- attr(err, "condition")
class(err_cnd)
#> [1] "recipes_error_step" "recipes_error" "rlang_error" #> [4] "error" "condition"
conditionMessage(err_cnd)
#> [1] "\nCaused by error in `prep()`:\n! Columns already contain the new level: Neighborhood"
Could we add a conditionMessage method that precedes the current conditionMessage() output with “Error in step_*”?
This issue 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.
I’m very much appreciating recipes pointing out which step errors occurred in following #1069. We unfortunately don’t get the benefits of those changes in tune (and possibly other packages that need to catch and rethrow errors from recipes, see tidymodels/tune#599), as dispatch falls back to the
rlang_error
method forconditionMessage()
:Could we add a
conditionMessage
method that precedes the currentconditionMessage()
output with “Error instep_*
”?Created on 2023-01-20 with reprex v2.0.2
The text was updated successfully, but these errors were encountered: