Prefix `seed_everything` log messages with rank info
See original GitHub issue🚀 Feature
The message here is printed per rank on purpose https://github.com/PyTorchLightning/pytorch-lightning/blob/bfa8b7be2d99b980afa62f5cb0433326bcfd2ef0/pytorch_lightning/utilities/seed.py#L69-L71 but this confuses users who are not aware of the difference
Pitch
Prefix the message with the rank just as we do for EarlyStopping
https://github.com/PyTorchLightning/pytorch-lightning/blob/bfa8b7be2d99b980afa62f5cb0433326bcfd2ef0/pytorch_lightning/callbacks/early_stopping.py#L256-L261
the above staticmethod should be pulled into a common utility function.
If you enjoy Lightning, check out our other projects! ⚡
-
Metrics: Machine learning metrics for distributed, scalable PyTorch applications.
-
Lite: enables pure PyTorch users to scale their existing code on any kind of device while retaining full control over their own loops and optimization logic.
-
Flash: The fastest way to get a Lightning baseline! A collection of tasks for fast prototyping, baselining, fine-tuning, and solving problems with deep learning.
-
Bolts: Pretrained SOTA Deep Learning models, callbacks, and more for research and production with PyTorch Lightning and PyTorch.
-
Lightning Transformers: Flexible interface for high-performance research using SOTA Transformers leveraging Pytorch Lightning, Transformers, and Hydra.
cc @borda @awaelchli
Issue Analytics
- State:
- Created a year ago
- Comments:5 (5 by maintainers)
@MrShevan go for it.
We have a utility function _get_rank() in
utilities/rank_zero.py
that accesses the environment variables. We can use that. Of course, this wouldn’t capture all (custom) cluster environments that get specified through trainer, as @carmocca mentioned. In such a case, the prefix will falsely display rank 0 for all messages.