Skip to content

ETA for progress bars #3

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

Closed
tkf opened this issue Oct 31, 2019 · 1 comment · Fixed by #4
Closed

ETA for progress bars #3

tkf opened this issue Oct 31, 2019 · 1 comment · Fixed by #4

Comments

@tkf
Copy link
Collaborator

tkf commented Oct 31, 2019

It would be nice to print ETA like ProgressMeter.jl does. To do this, I think we need to record progress value and time() when the logger received

struct ProgressBar
    init_progress::Float64
    init_time::Float64
end

struct TerminalLogger <: AbstractLogger
    ...
    bars::Dict{Symbol, ProgressBar}
end

Current TerminalLogger is nice as it is mostly "stateless" (except sticky_messages) and bars would break this property. But I think it would be required anyway at some point to support something like nested progress bars JuliaLogging/ProgressLogging.jl#7 (comment) / JuliaLogging/ProgressLogging.jl#8.

@c42f
Copy link
Member

c42f commented Oct 31, 2019

Yes, an ETA would be cool.

I'm fine with TerminalLogger being more stateful, I don't think we can make a good UI without tracking a fair bit of state.

For access to sticky_messages, we perhaps should move that out of TerminalLogger anyway and make it global in some way. It's a model of the connected terminal and there's generally only one of those (I guess there could be more but that seems like a funky thing we could deal with later).

Yikes, dynamic gensym() observed in ProgressLogging #7 is not ideal, let's fix that :-)

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

Successfully merging a pull request may close this issue.

2 participants