Skip to content
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

Feature request: Option to enable timing for each iteration #248

Open
EmilHvitfeldt opened this issue Jul 9, 2020 · 6 comments
Open

Feature request: Option to enable timing for each iteration #248

EmilHvitfeldt opened this issue Jul 9, 2020 · 6 comments
Labels
feature a feature request or enhancement

Comments

@EmilHvitfeldt
Copy link
Member

Pretty much what it says in the title.

Sometimes I have a suspicion that the computational time is related to one of the hyperparameter and it would be neat if you were able to test that hypothesis.

@juliasilge juliasilge added the feature a feature request or enhancement label Jul 9, 2020
@juliasilge
Copy link
Member

Related to #23

@simonpcouch
Copy link
Contributor

@bokov
Copy link

bokov commented Dec 15, 2022

I understand and respect that the devs are not going in that direction...

#450

Do the devs or any users reading this have any workaround suggestions for collecting timings as cleanly as possible without a built-in feature for now?

@bokov
Copy link

bokov commented Dec 15, 2022

Pretty much what it says in the title.

Sometimes I have a suspicion that the computational time is related to one of the hyperparameter and it would be neat if you were able to test that hypothesis.

@EmilHvitfeldt , in your PR you mention ...

The timing is done by using system.time() (like we do in parsnip) around the tune_grid_loop_iter() call in tune_grid_loop_iter_safely().

Is there a command or option setting in parsnip that records run-times? Could you elaborate on where to find it?
Thanks.

@EmilHvitfeldt
Copy link
Member Author

EmilHvitfeldt commented Dec 15, 2022

If you set verbosity = 2 then parsnip records run time. But there isn't a easy way to handle this in tune, and it wouldn't record the preprocessing times which in some cases takes longer than the model-fit

library(parsnip)

lm_spec <- linear_reg()

lm_fit <- fit(lm_spec, mpg ~ ., data = mtcars,
              control = control_parsnip(verbosity = 2))

lm_fit$elapsed
#>    user  system elapsed 
#>   0.002   0.000   0.002

Created on 2022-12-15 with reprex v2.0.2

@simonpcouch
Copy link
Contributor

Ah, related to #880, tidymodels/workflows#191, and friends. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants