Update `print` doc (#18053)
This commit is contained in:
parent
3a55f0c0a1
commit
234a78a957
|
@ -476,7 +476,8 @@ class Fabric:
|
||||||
return move_data_to_device(obj, device=self.device)
|
return move_data_to_device(obj, device=self.device)
|
||||||
|
|
||||||
def print(self, *args: Any, **kwargs: Any) -> None:
|
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.
|
Arguments passed to this method are forwarded to the Python built-in :func:`print` function.
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -1069,9 +1069,8 @@ class Trainer:
|
||||||
self.profiler.setup(stage=self.state.fn, local_rank=local_rank, log_dir=self.log_dir)
|
self.profiler.setup(stage=self.state.fn, local_rank=local_rank, log_dir=self.log_dir)
|
||||||
|
|
||||||
def print(self, *args: Any, **kwargs: Any) -> None:
|
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
|
"""Print something only on the first process. If running on multiple machines, it will print from the first
|
||||||
will only print from one process to avoid redundant outputs. When running across multiple nodes, this
|
process in each machine.
|
||||||
method will print from one process in each node.
|
|
||||||
|
|
||||||
Arguments passed to this method are forwarded to the Python built-in :func:`print` function.
|
Arguments passed to this method are forwarded to the Python built-in :func:`print` function.
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue