fix callback

Former-commit-id: 065680cd2a410d7ceab10a4a76588df43e286117
This commit is contained in:
hiyouga
2023-07-15 17:18:16 +08:00
parent 6261fb362a
commit a31a609377
4 changed files with 9 additions and 5 deletions

View File

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