diff --git a/src/lightning/fabric/fabric.py b/src/lightning/fabric/fabric.py index 0e39bb7833..3d8ea62739 100644 --- a/src/lightning/fabric/fabric.py +++ b/src/lightning/fabric/fabric.py @@ -476,7 +476,8 @@ class Fabric: return move_data_to_device(obj, device=self.device) def print(self, *args: Any, **kwargs: Any) -> None: - """Print something only on the first process. + """Print something only on the first process. If running on multiple machines, it will print from the first + process in each machine. Arguments passed to this method are forwarded to the Python built-in :func:`print` function. """ diff --git a/src/lightning/pytorch/trainer/trainer.py b/src/lightning/pytorch/trainer/trainer.py index 9aecc57b79..8bc3dcdb06 100644 --- a/src/lightning/pytorch/trainer/trainer.py +++ b/src/lightning/pytorch/trainer/trainer.py @@ -1069,9 +1069,8 @@ class Trainer: self.profiler.setup(stage=self.state.fn, local_rank=local_rank, log_dir=self.log_dir) def print(self, *args: Any, **kwargs: Any) -> None: - """Print the arguments to standard output. When running on multiple devices on a single node, this method - will only print from one process to avoid redundant outputs. When running across multiple nodes, this - method will print from one process in each node. + """Print something only on the first process. If running on multiple machines, it will print from the first + process in each machine. Arguments passed to this method are forwarded to the Python built-in :func:`print` function. """