Reapply "Refactor: Improve DDP detection in common.py"

This reverts commit 1a45e5b78a.
This commit is contained in:
Azekowka 2025-10-14 17:09:04 +05:00
parent 1a45e5b78a
commit 9a08bb4edb

View File

@ -76,7 +76,8 @@ def print_banner():
print0(banner)
def is_ddp():
# TODO is there a proper way
if dist.is_initialized():
return True
return int(os.environ.get('RANK', -1)) != -1
def get_dist_info():