-
Notifications
You must be signed in to change notification settings - Fork 363
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] No training log when the num of iterations is smaller than the default interval #1046
Conversation
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.
Hi, thanks for your contribution. The modification makes sense to me, but should we also update the after_val_iter
and after_test_iter
?
I think we don't need to update these because in val or test task, the loggerhook |
It makes sense to me 👍 |
Hi! Could you add a unit test for |
Hi, it could be more proper to add unit test here, and we should test runner.logger.info will be called when the length of dataloader is smaller than the log interval. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1046 +/- ##
=======================================
Coverage ? 77.89%
=======================================
Files ? 139
Lines ? 11300
Branches ? 2279
=======================================
Hits ? 8802
Misses ? 2103
Partials ? 395
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.
Motivation
No training log when the num of iterations is smaller than the default interval. https://github.com/open-mmlab/mmengine/issues/935
Modification
Add judgement in function
after_train_iter
of classLoggerHook
.BC-breaking (Optional)
Does the modification introduce changes that break the backward-compatibility of the downstream repos?
If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.
Use cases (Optional)
If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.
Checklist