Question about logging with DDP #19875
Unanswered
hypefolder
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
Replies: 1 comment
-
If you want rank zero only then pass the flag rank_zero_only = True. If not, I think the last rank to perform the logging operation will log the value, leading to some inconsistencies if the dataset is not large enough. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Does calling
self.log
from a lightning module during distributed training only save the results from rank 0? It is my understanding that ifsync_dist
is set toFalse
then the metrics are not reduced and only rank 0 metrics are logged. Could you also confirm that the actual logging is only performed on the rank 0 GPU?Thanks in advance for your help!
Beta Was this translation helpful? Give feedback.
All reactions