Unverified Commit 8a2a3a25 authored by Teven's avatar Teven Committed by GitHub
Browse files

Fix flos single node (#11844)

* fixing flos bug/typo in non-distributed setting

* storing flos every logging_interval
parent adb785b0
......@@ -1397,6 +1397,7 @@ class Trainer:
self._total_loss_scalar += tr_loss_scalar
self._globalstep_last_logged = self.state.global_step
self.store_flos()
self.log(logs)
......@@ -1909,7 +1910,7 @@ class Trainer:
self.state.total_flos += distributed_broadcast_scalars([self.current_flos]).sum().item()
self.current_flos = 0
else:
self.state.total_flos = self.current_flos
self.state.total_flos += self.current_flos
self.current_flos = 0
def _sorted_checkpoints(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment