Update callbacks.py

This commit is contained in:
hiyouga
2023-07-15 17:39:16 +08:00
parent 1e2b7e0c4b
commit d640c5545f

View File

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