Skip to content

Commit 996198a

Browse files
authored
Update run_pretrain.py (#8902)
1 parent 6f5bb76 commit 996198a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llm/run_pretrain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ def main():
585585
test_ret = trainer.predict(test_dataset)
586586
trainer.log_metrics("test", test_ret.metrics)
587587

588-
if training_args.should_load_dataset:
588+
if training_args.do_train and training_args.should_load_dataset:
589589
effective_tokens_per_second = total_effective_tokens / train_result.metrics["train_runtime"]
590590
print(f"Effective Tokens per second: {effective_tokens_per_second:.2f}")
591591
print(f"ips: {effective_tokens_per_second:.2f} tokens/s")

0 commit comments

Comments
 (0)