From ba9aa7e2aaf4eb31a92b12c14399e665dfe3ebeb Mon Sep 17 00:00:00 2001 From: hiyouga <467089858@qq.com> Date: Sat, 15 Jun 2024 04:47:13 +0800 Subject: [PATCH] fix #4292 Former-commit-id: 9092f963dba6f2e0eeade53b5b35e6b770f8348e --- src/llamafactory/webui/common.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/llamafactory/webui/common.py b/src/llamafactory/webui/common.py index 37b38df0..3b8d5378 100644 --- a/src/llamafactory/webui/common.py +++ b/src/llamafactory/webui/common.py @@ -39,7 +39,11 @@ def get_save_dir(*paths: str) -> os.PathLike: r""" Gets the path to saved model checkpoints. """ - paths = (path.replace(os.path.sep, "").replace(" ", "").strip() for path in paths) + if os.path.sep in paths[-1]: + logger.warning("Found complex path, some features may be not available.") + return paths[-1] + + paths = (path.replace(" ", "").strip() for path in paths) return os.path.join(DEFAULT_SAVE_DIR, *paths)