mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-12-15 19:30:36 +08:00
[misc] fix packing and eval plot (#7623)
This commit is contained in:
@@ -66,7 +66,13 @@ def run_pt(
|
||||
trainer.save_metrics("train", train_result.metrics)
|
||||
trainer.save_state()
|
||||
if trainer.is_world_process_zero() and finetuning_args.plot_loss:
|
||||
plot_loss(training_args.output_dir, keys=["loss", "eval_loss"])
|
||||
keys = ["loss"]
|
||||
if isinstance(dataset_module["eval_dataset"], dict):
|
||||
keys += [f"eval_{key}_loss" for key in dataset_module["eval_dataset"].keys()]
|
||||
else:
|
||||
keys += ["eval_loss"]
|
||||
|
||||
plot_loss(training_args.output_dir, keys=keys)
|
||||
|
||||
# Evaluation
|
||||
if training_args.do_eval:
|
||||
|
||||
Reference in New Issue
Block a user