master only when global rank and local rank is 0

This commit is contained in:
Shital Shah 2020-04-23 16:15:24 -07:00
Родитель 7a44b9fe37
Коммит 65b795271f
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -152,7 +152,7 @@ class ApexUtils:
def is_dist(self)->bool:
return self._enabled and self._distributed_enabled
def is_master(self)->bool:
return self.global_rank == 0
return self.global_rank == 0 and self.local_rank == 0
def _log_info(self, d:dict)->None:
if self.logger is not None: