This commit is contained in:
hiyouga 2024-06-15 04:47:13 +08:00
parent 78589cf90c
commit 9092f963db
1 changed files with 5 additions and 1 deletions

View File

@ -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)