-
Notifications
You must be signed in to change notification settings - Fork 19
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 callback that estimates walltime #2428
Conversation
Thanks, this is very useful! I will review it tomorrow morning. A very quick comment is that I find |
Ah, |
Let me know when you want me to review the PR :) |
I think I have a nice solution, but maybe you can review the rest of the PR in the mean time (just ignore |
I find the output kind of hard to parse: could you put the values next to the name? Or even on multiple lines (the macros do this automatically if you provide extra arguments julia> @info "Wall time" var"per step"=100 total=200 remaining=300
┌ Info: Wall time
│ per step = 100
│ total = 200
└ remaining = 300 |
julia> using Dates
julia> canonicalize(Second(10_000))
2 hours, 46 minutes, 40 seconds |
Yeah but, for now (JuliaLang/julia#52519 😄), there's no way to convert from |
One general design comment before I look at the details is that maybe we can be a little bit more ambitious that just tracking the walltime. You added a What do you think? (For this PR, this would probably just amounts to renaming the struct) (And I also agree with Simon that the output is hard to read.) |
Let's also add time spent |
I think it would be good to have:
|
ideally we would also want to exclude the first time step. |
675d990
to
b1acc78
Compare
Alright, I've
it now looks like:
I think this is ready for review + bike shedding cc @simonbyrne, @Sbozzolo . I'll update the original post to include this snapshot. |
a0dfbf3
to
c4a1ae9
Compare
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.
Thank you! I have only minor cosmetic comments.
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.
Looks good to me! :)
Increase allocation limits Bump allocation limits Finish comment in flame graph Fix doc string Improve names, add docs Improve names Improve docs and names Improve docs, qualify Period Improve names Add comment for eval function Maintain log after 50% Add warning for restarted simulations
733140c
to
5fc53d6
Compare
This PR adds a callback that logs some helpful runtime information:
The callback uses a doubling backoff (we log on step 2, 4, 8, 16, 32, ...) to provide frequent estimates near the beginning of simulations, but increasingly infrequent as time goes on to avoid bloating the log (I don't want people to have to scroll through a zillion info statements in the longruns to get to the end of the log).