fall / scripts /common.py
minhy112's picture
Upload project files excluding raw data folder
ae419ed verified
Raw
History Blame Contribute Delete
362 Bytes
from __future__ import annotations
import sys
from pathlib import Path
import yaml
ROOT = Path(__file__).resolve().parents[1]
SRC = ROOT / "src"
if str(SRC) not in sys.path:
sys.path.insert(0, str(SRC))
def load_config(path: str = "configs/default.yaml") -> dict:
with open(ROOT / path, "r", encoding="utf-8") as f:
return yaml.safe_load(f)