-
Notifications
You must be signed in to change notification settings - Fork 88
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
add extract_fit_time #853
add extract_fit_time #853
Conversation
R/fit.R
Outdated
@@ -445,8 +445,14 @@ allow_sparse <- function(x) { | |||
#' @export | |||
print.model_fit <- function(x, ...) { | |||
cat("parsnip model object\n\n") | |||
if (!is.na(x$elapsed[["elapsed"]])) { | |||
cat("Fit time: ", prettyunits::pretty_sec(x$elapsed[["elapsed"]]), "\n") | |||
if (is.null(x$elapsed$print)) { |
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.
I'm sure this can be rewritten better. If we go ahead with these functions then I'll clean it
Merge commit 'a85e5083de0d1ec8087678cf21580690a37da81b' #Conflicts: # DESCRIPTION
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.
One comment on naming things (time of all things 🤪 )
Merge branch 'main' into extract_fit_time # Conflicts: # DESCRIPTION # NEWS.md # R/fit_helpers.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.
🏄 Just one similar docs edits with workflows.
Co-authored-by: Simon P. Couch <[email protected]>
This pull request 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. |
This is part of a series of PRs to add a new generic
extract_fit_time()
to allow users to investigate how long different tidymodels objects takes to fit.TODO:
id
clashed withid
returned fromtune_grid()
Related PRs
tidymodels/hardhat#218
tidymodels/recipes#1071
tidymodels/workflows#191