ProgressMeter.jl icon indicating copy to clipboard operation
ProgressMeter.jl copied to clipboard

Use Base logging for progress meters

Open ChrisRackauckas opened this issue 6 years ago • 7 comments

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.

ChrisRackauckas avatar Jul 21 '18 14:07 ChrisRackauckas

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.

adamslc avatar Aug 18 '18 16:08 adamslc

It's compatible with the same command of Juno (shown above)?

ChrisRackauckas avatar Aug 18 '18 18:08 ChrisRackauckas

Yes, it works with that invocation.

adamslc avatar Aug 18 '18 22:08 adamslc

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).

c42f avatar Dec 20 '18 00:12 c42f

ProgressMeter is so great, thanks for this package that really helps the user experience in Juno.

Is there any scope for Jupyter notebook support?

AshtonSBradley avatar Jun 17 '19 22:06 AshtonSBradley

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

c42f avatar Jun 18 '19 01:06 c42f

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

tkf avatar Oct 17 '19 08:10 tkf