From cba294f74ddb97ce298986f40f4fcacf1e22958d Mon Sep 17 00:00:00 2001 From: wql Date: Wed, 18 Sep 2024 16:11:43 +0800 Subject: [PATCH] feat: add cur_time to log --- run_once.sh | 2 ++ src/llamafactory/train/callbacks.py | 1 + 2 files changed, 3 insertions(+) diff --git a/run_once.sh b/run_once.sh index 0a14967a..8444e736 100644 --- a/run_once.sh +++ b/run_once.sh @@ -1,5 +1,7 @@ #!/bin/bash + +# bash run_once.sh lora_sft Qwen-7B 8 50 run_type="$1" model="$2" gpu_cnt="$3" diff --git a/src/llamafactory/train/callbacks.py b/src/llamafactory/train/callbacks.py index 4f34791b..b33c2aa7 100644 --- a/src/llamafactory/train/callbacks.py +++ b/src/llamafactory/train/callbacks.py @@ -303,6 +303,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.strftime("%Y-%m-%d %H:%M:%S", time.localtime()), elapsed_time=self.elapsed_time, remaining_time=self.remaining_time, )