-
Notifications
You must be signed in to change notification settings - Fork 39
frameworks: Call live.end at the end of training.
#364
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
Conversation
src/dvclive/live.py
Outdated
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.
Minor: Could you use the @functools.cache decorator on def end(self): instead of adding self._ended?
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.
Depending on what we agree in #364 (comment)
|
How should this type of scenario work? |
I would expect the live metrics functionality to be only working inside the callback. If I decouple the So: self.make_summary()
if self.report_mode == "studio":
if not self._ended:
if not post_to_studio(self, "done", logger):
logger.warning("`post_to_studio` `done` event failed.")
self._ended = True
else:
self.make_report() |
|
None of this is a blocker since I don't think anything breaks the basic live metrics workflow, but it would be good to have it to "unbreak" more complex scenarios.
It's a little ugly but more likely to work the way users want (log summary/report always).
Can we also have something like this to enable the context manager to override other calls to
|
49b1027 to
a923a10
Compare
24de14d to
986fc2e
Compare
Ensure `post_to_studio` inside `live.end` is only called once.
986fc2e to
9c5cd45
Compare
Codecov ReportBase: 96.37% // Head: 96.47% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #364 +/- ##
==========================================
+ Coverage 96.37% 96.47% +0.10%
==========================================
Files 36 36
Lines 1739 1789 +50
Branches 153 155 +2
==========================================
+ Hits 1676 1726 +50
Misses 37 37
Partials 26 26
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Ensure logic inside
live.endis only called once.This is mainly for Studio to get a "completed" event when using the frameworks