Fix illegal tb_logger use in distributed training

This commit is contained in:
James Betker 2020-07-23 09:14:01 -06:00
parent bba283776c
commit a7541b6d8d

View File

@ -203,6 +203,7 @@ def main():
message += ')] ' message += ')] '
for k, v in logs.items(): for k, v in logs.items():
if 'histogram' in k: if 'histogram' in k:
if rank <= 0:
tb_logger.add_histogram(k, v, current_step) tb_logger.add_histogram(k, v, current_step)
else: else:
message += '{:s}: {:.4e} '.format(k, v) message += '{:s}: {:.4e} '.format(k, v)