-
Notifications
You must be signed in to change notification settings - Fork 238
Make progress statements a part of time_step!
#432
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
Comments
This can also be done with a diagnostic? |
If you want to integrate with the Julia "progress bar" system, you could put in something like: @debug "this is a short description of my loop" progress=iteration/length_of_loop This works in Juno, and with MicroLogging.jl in the REPL. |
@glwagner True, we should just make use of the existing infrastructure. We don't have to call it a monitor but seems like this diagnostic would be closer in spirit to We might want to have some way of accessing the @asinghvi17 Thanks for the tip! Had no idea you could pass a |
It could make sense to have a simulation = Simulation(model, dt, stop_time=8day, wall_time_limit=1day, progress=ProgressMessenger(diags=diags), ...)
run!(simulation) |
I think we agreed that making pretty progress statements with UnicodePlots is not a good use of our time, but just to document the possibilities, here are a couple of packages for pretty printing traces: https://github.com/jagot/SolverTraces.jl |
Instead of having us manually print a progress statement in a
while
loop, maybe we can pass aprogress_message(model)
function totime_step!
that does this.This should help clean up the scripts a lot, and we could provide a couple of reasonable defaults instead of setting up this functionality in every script.
Eventually the
progress_message(model)
function can be made fancy as we wish with unicode plots, a curses interface for complex progress output, or even email updates.The text was updated successfully, but these errors were encountered: