mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-28 02:04:53 +08:00
PEP585 update - torch/distributed (#145164)
See #145101 for details. Pull Request resolved: https://github.com/pytorch/pytorch/pull/145164 Approved by: https://github.com/bobrenjc93
This commit is contained in:
committed by
PyTorch MergeBot
parent
c6986ca2e1
commit
00ffeca1b1
@ -2,7 +2,7 @@
|
||||
import warnings
|
||||
from abc import ABC, abstractmethod
|
||||
from types import TracebackType
|
||||
from typing import Any, List, NamedTuple, Optional, Type
|
||||
from typing import Any, NamedTuple, Optional
|
||||
|
||||
import torch
|
||||
import torch.distributed as dist
|
||||
@ -165,7 +165,7 @@ class Join:
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
joinables: List[Joinable],
|
||||
joinables: list[Joinable],
|
||||
enable: bool = True,
|
||||
throw_on_early_termination: bool = False,
|
||||
**kwargs,
|
||||
@ -228,7 +228,7 @@ class Join:
|
||||
|
||||
def __exit__(
|
||||
self,
|
||||
type: Optional[Type[BaseException]],
|
||||
type: Optional[type[BaseException]],
|
||||
value: Optional[BaseException],
|
||||
traceback: Optional[TracebackType],
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user