Skip to content

Commit

Permalink
Try not to round num_updates (facebookresearch#1836)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenroller authored Jul 10, 2019
1 parent f57f5ac commit 742210b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions parlai/scripts/train_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,8 @@ def _average_dicts(self, all_versions):
else:
# all other cases, take the mean across the workers
finalized[k] = np.mean(values)
if all(isinstance(v, int) for v in values):
finalized[k] = int(finalized[k])
return finalized

def _cleanup_inaccurate_metrics(self, metrics):
Expand Down

0 comments on commit 742210b

Please sign in to comment.