From b384303b8c4cc3f0e8cb33d79f4d79e2aa3f36c4 Mon Sep 17 00:00:00 2001 From: Lorenzo Padoan Date: Sat, 24 May 2025 10:30:04 +0200 Subject: [PATCH] fix: comment from logile to logfile --- train_gpt2.py | 2 +- train_llama3.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/train_gpt2.py b/train_gpt2.py index b9dee8701..5302ef683 100644 --- a/train_gpt2.py +++ b/train_gpt2.py @@ -840,7 +840,7 @@ def get_lr(it): # the 0th iteration is often an outlier (much slower) => skip logging it tokens_per_second = grad_accum_steps * ddp_world_size * B * T / (t1-t0) print0(f"step {step+1:4d}/{args.num_iterations} | train loss {lossf:.6f} | norm {norm:.4f} | lr {lr:.2e} | ({(t1-t0)*1000:.2f} ms | {tokens_per_second:.0f} tok/s)") - # log to logile + # log to logfile if master_process and logfile is not None: with open(logfile, "a") as f: f.write("s:%d trl:%f\n" % (step, lossf)) diff --git a/train_llama3.py b/train_llama3.py index f9daafde0..c79365c89 100644 --- a/train_llama3.py +++ b/train_llama3.py @@ -1235,7 +1235,7 @@ def get_lr(it): # the 0th iteration is often an outlier (much slower) => skip logging it tokens_per_second = grad_accum_steps * ddp_world_size * B * T / (t1-t0) print0(f"step {step+1:4d}/{args.num_iterations} | train loss {lossf:.6f} | norm {norm:.4f} | lr {lr:.2e} | ({(t1-t0)*1000:.2f} ms | {tokens_per_second:.0f} tok/s)") - # log to logile + # log to logfile if master_process and logfile is not None: with open(logfile, "a") as f: f.write("s:%d trl:%f\n" % (step, lossf))