feat: add cur_time to log

This commit is contained in:
wql 2024-08-20 10:35:46 +08:00
parent c93a5b8b8f
commit 0ab6f2836b
1 changed files with 1 additions and 0 deletions

View File

@ -302,6 +302,7 @@ class LogCallback(TrainerCallback):
learning_rate=state.log_history[-1].get("learning_rate", None),
epoch=state.log_history[-1].get("epoch", None),
percentage=round(self.cur_steps / self.max_steps * 100, 2) if self.max_steps != 0 else 100,
cur_time = time.time(),
elapsed_time=self.elapsed_time,
remaining_time=self.remaining_time,
throughput="{:.2f}".format(state.num_input_tokens_seen / (time.time() - self.start_time)),