ProgressMeter.jl
ProgressMeter.jl copied to clipboard
Use Base logging for progress meters
Base now has a way to log progress information. Juno is using:
@logmsg -1 "making progress" progress=0.5 # or progress=NaN, or progress="done"
This means that the standard logging setup can generate the logging information. It would be good if on v0.7 ProgressMeter.jl becomes simply a way of displaying this logging information. This way every package can natively support progress meters and how it is displayed just becomes a user-preference or IDE side issue.
This should be done in coordination with @pfitzseb and his work on Juno.
I have a prototype of this working at ProgressLogging. I started out intending to update ProgressMeter, but now it seems to me that the two packages actually provide very different functionality, and neither one can completely replace the other.
It's compatible with the same command of Juno (shown above)?
Yes, it works with that invocation.
I started writing a comment here about how I think progress logging should work with the new infrastructure, and totally nerd sniped myself. Which led to the following implementation in MicroLogging.ConsoleLogger
:
https://github.com/c42f/MicroLogging.jl/pull/18
In particular I'm quite excited about MicroLogging.StickyMessages
, which is a general solution to having a selection of messages be "sticky" at the bottom of the screen, while the rest of the console text scrolls freely, including both logging and other stream output. I think this should eventually be folded into the Base REPL code (though there is some yak shaving in libuv to do before it will work smoothly on windows).
ProgressMeter is so great, thanks for this package that really helps the user experience in Juno.
Is there any scope for Jupyter notebook support?
There's such a thing in python so it's technically possible to do in the jupyter UI already. I don't know much about the technical details though. See https://github.com/tqdm/tqdm#ipython-jupyter-integration
There is now https://github.com/JunoLab/ProgressLogging.jl which should be usable as a drop-in replacement of Juno.
I also created https://github.com/tkf/ConsoleProgressMonitor.jl as a console-based backend for handling the log messages using ProgressMeter.jl.
ref: https://github.com/JunoLab/ProgressLogging.jl/issues/1