Skip to content

Commit

Permalink
Jean-Zay specific imports
Browse files Browse the repository at this point in the history
  • Loading branch information
William-N-Havard committed Sep 26, 2024
1 parent 3aa2bf9 commit 4f06e98
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions fairseq/distributed/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@

logger = logging.getLogger(__name__)

try:
import idr_torch
logger.info("Loaded idr_torch sucessfully")
if idr_torch.rank == 0:
print(">>> Training on ", len(idr_torch.hostname), " nodes and ", idr_torch.size, " processes")

except ImportError:
logger.warning("Couldn't load idr_torch")


def is_master(cfg: DistributedTrainingConfig):
return cfg.distributed_rank == 0
Expand Down

0 comments on commit 4f06e98

Please sign in to comment.