Download src/utils/config_utils.py from ChatterjeeLab/MemDLM: direct link, hf CLI and curl.
- Browser
- Download file 435 Bytes
-
https://huggingface.co/ChatterjeeLab/MemDLM/resolve/main/src/utils/config_utils.py
- Command line
-
hf download hf://ChatterjeeLab/MemDLM/src/utils/config_utils.py
-
curl -L -o config_utils.py https://huggingface.co/ChatterjeeLab/MemDLM/resolve/main/src/utils/config_utils.py
435 Bytes
| from pathlib import Path | |
| from omegaconf import OmegaConf | |
| # Repository root (MeMDLM_v2/) | |
| REPO_ROOT = Path(__file__).resolve().parents[2] | |
| def load_config(config_name: str): | |
| """Load a YAML config from src/configs/.""" | |
| return OmegaConf.load(REPO_ROOT / "src" / "configs" / config_name) | |
| def repo_path(*parts: str) -> Path: | |
| """Build an absolute path relative to the repository root.""" | |
| return REPO_ROOT.joinpath(*parts) | |