add rank_zero_only for ExperimentBase.save

This commit is contained in:
chenfeiyu 2021-02-18 19:33:41 +08:00
parent f423323bae
commit 0af7402daa
1 changed files with 1 additions and 0 deletions

View File

@ -124,6 +124,7 @@ class ExperimentBase(object):
"""
dist.init_parallel_env()
@mp_tools.rank_zero_only
def save(self):
"""Save checkpoint (model parameters and optimizer states).
"""