-
Notifications
You must be signed in to change notification settings - Fork 667
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
Fix logging metrics in DDP mode #426
Conversation
Codecov ReportBase: 84.59% // Head: 84.81% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #426 +/- ##
==========================================
+ Coverage 84.59% 84.81% +0.22%
==========================================
Files 9 9
Lines 344 349 +5
==========================================
+ Hits 291 296 +5
Misses 53 53
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. |
What does this PR do?
Fixes #407
Implements logging metrics through objects instead of through values.
Wraps loss in
MeanMetric
to unify the way loss and accuracy are logged.Gets rid of resetting metrics at the end of epoch since it's no longer needed when logging through metric object.
*The main motivation for this PR is no longer needing to set
sync_dist=True
in DDP mode to synchronize metrics across GPU processes (since synchronization is automatic when logging through metric object).**Notice logging through metric object and logging through value gives exactly the same results:
Before submitting
pytest
command?pre-commit run -a
command?Did you have fun?
Make sure you had fun coding 🙃