-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve error messages #80
Conversation
@@ -89,6 +89,7 @@ | |||
#' cart_pca_bag | |||
#' } | |||
#' @export | |||
#' @include validate.R |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DOWN WITH aaa FILES
} | ||
|
||
# TODO extend to use mode from model object(s) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could eventually extend baguette to censored regression models. There is a lot of code that looks at the data to get the mode or assumes that they are either regression or classification.
} | ||
|
||
if (!is.na(msg)) { | ||
# escape any brackets in the error message |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A long way to get there but this should make much much nicer error messages when models fail
Code | ||
bagger(Sepal.Length ~ ., data = iris, times = 2L, base_model = "C5.0") | ||
Condition | ||
Error in `validate_outcomes_are_factors()`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of our snapshots are going to change once these hardhat functions can take calls
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good!
by looking at the snapshots, i see some calls aren't passed through to hardhat::validate_outcomes_are_factors()
and
validate_outcomes_are_univariate()
. these don't yet have call
arguments so we have to wait for {hardhat} for them
there is also a call to stop()
on line 100 of R/bagger.R
that needs to be converted. Wasn't able to tag directly as it is "outside of github scope"
Closes #70
This needed sooo much upkeep that it was difficult to separate the different modes of error upgrades.
This PR adds type checkers, refines cli messages, routes calls to the user-facing function, and cleans up a bunch of dplyr/purrr calls that lack namespaces.