-
Notifications
You must be signed in to change notification settings - Fork 3.6k
fix logger creating directory structure too early in DDP #6380
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
Codecov Report
@@ Coverage Diff @@
## master #6380 +/- ##
=======================================
- Coverage 94% 90% -3%
=======================================
Files 161 161
Lines 11497 11388 -109
=======================================
- Hits 10753 10284 -469
- Misses 744 1104 +360 |
carmocca
left a comment
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.
Great! Does the test fail in current master?
|
@carmocca yes, it fails on master :) |
tchaton
left a comment
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.
LGTM !
| def pre_dispatch(self): | ||
| self.accelerator.pre_dispatch() | ||
|
|
||
| # log hyper-parameters |
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.
Can we wrap this into a function ?
* fix * add simple test * fix imports * add changelog * tighter test with on_fit_start hook closer to the dispatch call * move class inside test f unction * add a comment (cherry picked from commit fc6d402)
* fix * add simple test * fix imports * add changelog * tighter test with on_fit_start hook closer to the dispatch call * move class inside test f unction * add a comment (cherry picked from commit fc6d402)
What does this PR do?
Fixes #6364
All this PR does is delay the first calls to the logger to a point where the worker processes (e.g. in DDP) have access to their rank information. This prevents the logger from writing to the same file in every process
The added test fails on master.
Before submitting
PR review
Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:
Did you have fun?
Make sure you had fun coding 🙃