cli updates

This commit is contained in:
Hardik Shah 2024-07-21 01:51:54 -07:00
parent 23fe353e4a
commit c9f33d8f68
5 changed files with 14 additions and 9 deletions

View file

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