-
Notifications
You must be signed in to change notification settings - Fork 33
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
logger: add progress bar while training #64
Comments
Thanks, @discdiver! Could you give more detail about what you would want to see? For example:
|
Those would all be great @dberenbaum! I was envisioning something like TensorFlow Keras's progress bars/info:
Example from the docs |
@discdiver
|
Related to #61:
It seems like the info could include:
What do you think about also borrowing the syntax from for step in dvclive.range(100, path="logs", ...):
...
dvclive.log("metric", value) This might make a good candidate for https://github.com/iterative/enhancement-proposals. |
AKA "relative time" and "wall time" (this is the terminology in both mlflow and tensorboard). |
Probably better to put this in a different issue. |
I guess I might have rushed a little bit with implementing that feature. As @pmrowla mentioned, displaying progress bar might no be what one should expect from external library taking care of metrics logging. That does not make sense with tf integration (TF has its own progress bar), it might make sense in case of Instead of providing logging capabilities that would need to be in many case adjusted for particular use case, maybe we should I think that we could just make
|
I'm not sure I'm following. Printing metrics in realtime to stdout and/or a file (or both) is what I would expect.
Providing an option to print relevant info to stdout seems useful in most cases as long as it can be silenced in scenarios where it's undesirable. The fact that this functionality exists in several ML frameworks already likely influenced this feature request and shows that it's generally expected behavior.
Sounds like a good way to implement it, but I don't see why not provide a default implementation for users out of the box. |
I think the assumption would be that users would configure it to update/display the metrics in the trailer part of a tqdm progress bar (after the visual "bar" itself) so in the same way that TF does it
|
If tensorflow does this for users, why should dvclive ask users to implement it themselves? What utility is dvclive providing at that point? It seems like this defeats the purpose of dvclive, which is largely to provide framework-agnostic metrics logging (whether that be in the terminal, a text file, a plot, etc.). |
@dberenbaum Isn't tensorflow a framework for the entire training process, and not just a logging mechanism? TF can display a progress bar because TF runs the actual loop. for i in range(epochs): # It makes sense to have a progress bar at the level of this `for` statement (or any level outside this loop)
... # do training things
dvclive.log()
dvclive.next_step() # this tells dvclive that one iteration has ended (but dvclive does not have any control over the `for` loop itself My understanding is that for TF, a If all we want to do is just call
This seems like the right track to me. We should define a If the user's training happens in a loop context and they want to display a TF style progress bar, they can wrap their loop in a |
Let's start there. I think of it as having stdout be one of several output options. To me, it's a really useful one since I can see the progress from the terminal where I executed the model training script instead of having to open something else. |
Just came across the rich Python package, which has some very nice progress bars for terminals. |
Thanks, @discdiver! Rich is actually used in dvc exp show, so utilizing it in dvclive also would make sense. |
Closing this in favor of #206 . About the original request for progress bars, progress bar responsibility lies more on the ML than on DVCLive (the logger) |
Very cool product! Thank you for it!
Would be nice if a progress bar like TQDM would update to STDOUT while training.
The text was updated successfully, but these errors were encountered: