From d5ca8763ea739d118b33b0093b4ed60bbb992804 Mon Sep 17 00:00:00 2001 From: hiyouga Date: Wed, 10 Apr 2024 23:57:59 +0800 Subject: [PATCH] fix #3225 Former-commit-id: a99f5ed0b6f7932810c6baf127d21f4be44144ad --- src/llmtuner/extras/ploting.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/llmtuner/extras/ploting.py b/src/llmtuner/extras/ploting.py index aa101cb7..fd3cb8a3 100644 --- a/src/llmtuner/extras/ploting.py +++ b/src/llmtuner/extras/ploting.py @@ -52,6 +52,6 @@ def plot_loss(save_dictionary: os.PathLike, keys: List[str] = ["loss"]) -> None: plt.xlabel("step") plt.ylabel(key) plt.legend() - figure_path = os.path.join(save_dictionary, "training_{}.png".format(key.replace(os.path.sep, "_"))) + figure_path = os.path.join(save_dictionary, "training_{}.png".format(key.replace("/", "_"))) plt.savefig(figure_path, format="png", dpi=100) print("Figure saved at:", figure_path)