Fix a logic flaw that causes checkpoints to be saved at wrong epochs.
This commit is contained in:
parent
9b86d8c0b8
commit
9cf6c3824b
|
@ -364,7 +364,7 @@ def _all_gather_predictions(predictions):
|
|||
|
||||
|
||||
def save_checkpoint(args, trainer, epoch_itr, val_loss):
|
||||
if epoch_itr.epoch % args.save_interval == 0:
|
||||
if epoch_itr.epoch % args.save_interval != 0:
|
||||
return
|
||||
if args.no_save or not distributed_utils.is_master(args):
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue