mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-04 04:04:14 +00:00
cli updates
This commit is contained in:
parent
23fe353e4a
commit
c9f33d8f68
5 changed files with 14 additions and 9 deletions
|
@ -8,6 +8,9 @@ from hydra.core.global_hydra import GlobalHydra
|
|||
from omegaconf import OmegaConf
|
||||
|
||||
|
||||
DEFAULT_DUMP_DIR = os.path.expanduser("~/.llama/")
|
||||
|
||||
|
||||
def get_root_directory():
|
||||
current_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
while os.path.isfile(os.path.join(current_dir, "__init__.py")):
|
||||
|
@ -16,8 +19,8 @@ def get_root_directory():
|
|||
return current_dir
|
||||
|
||||
|
||||
def get_config_dir():
|
||||
return os.path.join(get_root_directory(), "toolchain", "configs")
|
||||
def get_default_config_dir():
|
||||
return os.path.join(DEFAULT_DUMP_DIR, "configs")
|
||||
|
||||
|
||||
def parse_config(config_dir: str, config_path: Optional[str] = None) -> str:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue