This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r""" | |
A collection of common utilities for distributed training. These are a bunch of | |
wrappers over utilities from :mod:`torch.distributed` module, but they do not | |
raise exceptions in absence of distributed training / CPU-only training, and | |
fall back to sensible default behavior. | |
""" | |
from typing import Callable, Dict, Tuple, Union | |
from loguru import logger | |
import torch |