def is_distributed() -> bool:
    """Return True if distributed environment has been initialized."""
    return torch_dist.is_available() and torch_dist.is_initialized()
Return True if distributed environment has been initialized.
projects/llava_sam2/evaluation/utils/dist.py