From f8703aac08b45d23b341209b47db74679fba2c65 Mon Sep 17 00:00:00 2001 From: hiyouga Date: Thu, 2 Nov 2023 17:02:44 +0800 Subject: [PATCH] fix #1349 --- src/llmtuner/webui/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/llmtuner/webui/utils.py b/src/llmtuner/webui/utils.py index b178e79a..78322356 100644 --- a/src/llmtuner/webui/utils.py +++ b/src/llmtuner/webui/utils.py @@ -90,9 +90,11 @@ def get_eval_results(path: os.PathLike) -> str: def gen_plot(base_model: str, finetuning_type: str, output_dir: str) -> matplotlib.figure.Figure: + if not base_model: + return log_file = get_save_dir(base_model, finetuning_type, output_dir, "trainer_log.jsonl") if not os.path.isfile(log_file): - return None + return plt.close("all") fig = plt.figure()