Skip to content

Commit

Permalink
Init Dist Default None (mosaicml#3585)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvpatel2000 authored Aug 29, 2024
1 parent 62b70f3 commit dec6718
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions composer/utils/dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ def is_initialized():
return dist.is_initialized()


def initialize_dist(device: Union[str, Device], timeout: float = 300.0) -> None:
def initialize_dist(device: Optional[Union[str, Device]] = None, timeout: float = 300.0) -> None:
"""Initialize the default PyTorch distributed process group.
This function assumes that the following environment variables are set:
Expand All @@ -517,9 +517,9 @@ def initialize_dist(device: Union[str, Device], timeout: float = 300.0) -> None:
.. seealso:: :func:`torch.distributed.init_process_group`
Args:
device (str | Device): The device from which the distributed backend is
device (Optional[str | Device] ): The device from which the distributed backend is
interpreted. Either a string corresponding to a device (one of ``'cpu'``,
``'gpu'``, ``'mps'``, or ``'tpu'``) or a :class:`.Device`.
``'gpu'``, ``'mps'``, or ``'tpu'``) or a :class:`.Device`. (default: ``None``)
timeout (float, optional): The timeout for operations executed against the process
group, expressed in seconds. (default: ``300.0``).
"""
Expand Down

0 comments on commit dec6718

Please sign in to comment.