-
-
Notifications
You must be signed in to change notification settings - Fork 609
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
Use ProgressLogging instead of Juno #1859
Conversation
Compat bound missing |
@@ -120,6 +121,7 @@ function train!(loss, ps, data, opt; cb = () -> ()) | |||
rethrow(ex) | |||
end | |||
end | |||
@logprogress i / n |
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.
How does @logprogress
handle Inf
here? Is it possible to make the progress bar indeterminate if n == 0?
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.
The progress will just show up as 0% until the end of the loop then jump to 100%. I think @logprogress
accepts NaN or Inf as part of its API to indicate a "no-op."
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.
There is no API for indeterminate, just lots of discussion on the ProgressLogging issues. It's unclear to me that we'd be able to take advantage of the proposed APIs too, because we don't know the criteria used to measure convergence.
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.
I was thinking something along the lines of what tqdm does (just report it/s
or s/it
), but good to know.
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.
Yeah maybe we can use something like this eventually: JuliaLogging/ProgressLogging.jl#23. Right now I think it requires a specific frontend for ProgressLogging to work how we want it. It doesn't work with the VSCode frontend.
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.
There is no API for indeterminate
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.
Thanks, I thought nothing
has the same behavior as NaN
(at least in VS Code).
This replaces Juno with ProgressLogging. Closes #1807 and fixes #1779.
This overcomes the
_linindex
issue by manually updating the progress using@logprogress
and callinglength
instead. In the case of infinite iterators, the code will still run but we don't have a clear way to measure progress (so the bar will jump from 0 to 100).One possible issue is infinite iterators that improperly implement the Base iterator interface. Right now this PR takes the "implement the interface correctly" stance, but we could also try/catch on
length
.PR Checklist
Tests are addedEntry in NEWS.mdDocumentation, if applicable