Skip to content

Commit 427fdfa

Browse files
authored
Update docstring for self.log about keys in distributed training (#19917)
1 parent dffc0f9 commit 427fdfa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lightning/pytorch/core/module.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ def log(
405405
The default behavior per hook is documented here: :ref:`extensions/logging:Automatic Logging`.
406406
407407
Args:
408-
name: key to log.
408+
name: key to log. Must be identical across all processes if using DDP or any other distributed strategy.
409409
value: value to log. Can be a ``float``, ``Tensor``, or a ``Metric``.
410410
prog_bar: if ``True`` logs to the progress bar.
411411
logger: if ``True`` logs to the logger.
@@ -569,6 +569,7 @@ def log_dict(
569569
570570
Args:
571571
dictionary: key value pairs.
572+
Keys must be identical across all processes if using DDP or any other distributed strategy.
572573
The values can be a ``float``, ``Tensor``, ``Metric``, or ``MetricCollection``.
573574
prog_bar: if ``True`` logs to the progress base.
574575
logger: if ``True`` logs to the logger.

0 commit comments

Comments
 (0)