pytorch-lightning
pytorch-lightning copied to clipboard
Unify rank zero messaging utilities
What does this PR do?
Refactor after https://github.com/Lightning-AI/lightning/issues/13290 Re-do of https://github.com/Lightning-AI/lightning/pull/13365
Benefits:
- Separates logging concerns into message generation and actual logging
- Unifies testing.
- The rank prefix for the seed message will not appear if not running under a distributed setting now
Does your PR introduce any breaking changes? If yes, please list them.
None
Before submitting
- [x] Was this discussed/approved via a GitHub issue? (not for typos and docs)
- [x] Did you read the contributor guideline, Pull Request section?
- [x] Did you make sure your PR does only one thing, instead of bundling different changes together?
- [n/a] Did you make sure to update the documentation with your changes? (if necessary)
- [x] Did you write any new necessary tests? (not for typos and docs)
- [x] Did you verify new and existing tests pass locally with your changes?
- [x] Did you list all the breaking changes introduced by this pull request?
- [n/a] Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)
PR review
- [x] Is this pull request ready for review? (if not, please submit in draft mode)
- [x] Check that all items from Before submitting are resolved
- [x] Make sure the title is self-explanatory and the description concisely explains the PR
- [x] Add labels and milestones (and optionally projects) to the PR so it can be classified
cc @justusschock @awaelchli @rohitgr7 @akihironitta