This commit is contained in:
hiyouga
2023-07-18 16:36:24 +08:00
parent 6f9360c0bd
commit cadeac0f44
3 changed files with 35 additions and 18 deletions

View File

@@ -47,6 +47,9 @@ class LogCallback(TrainerCallback):
r"""
Event called after logging the last logs.
"""
if not state.is_world_process_zero:
return
cur_time = time.time()
cur_steps = state.log_history[-1].get("step")
elapsed_time = cur_time - self.start_time