forked from phoenix-oss/llama-stack-mirror
Ensure model_local_dir does not mangle "C:\" on Windows
This commit is contained in:
parent
9ddda91180
commit
34be07e0df
1 changed files with 2 additions and 3 deletions
|
@ -4,11 +4,10 @@
|
||||||
# This source code is licensed under the terms described in the LICENSE file in
|
# This source code is licensed under the terms described in the LICENSE file in
|
||||||
# the root directory of this source tree.
|
# the root directory of this source tree.
|
||||||
|
|
||||||
import os
|
from pathlib import Path
|
||||||
|
|
||||||
from .config_dirs import DEFAULT_CHECKPOINT_DIR
|
from .config_dirs import DEFAULT_CHECKPOINT_DIR
|
||||||
|
|
||||||
|
|
||||||
def model_local_dir(descriptor: str) -> str:
|
def model_local_dir(descriptor: str) -> str:
|
||||||
path = os.path.join(DEFAULT_CHECKPOINT_DIR, descriptor)
|
return str(Path(DEFAULT_CHECKPOINT_DIR) / (descriptor.replace(":", "-")))
|
||||||
return path.replace(":", "-")
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue