Download libs/utils/config.py from QPromaQ/Docking_project: direct link, hf CLI and curl.
- Browser
- Download file 465 Bytes
-
https://huggingface.co/datasets/QPromaQ/Docking_project/resolve/main/libs/utils/config.py
- Command line
-
hf download hf://datasets/QPromaQ/Docking_project/libs/utils/config.py
-
curl -L -o config.py https://huggingface.co/datasets/QPromaQ/Docking_project/resolve/main/libs/utils/config.py
465 Bytes
| from __future__ import annotations | |
| from pathlib import Path | |
| from typing import Any, Dict | |
| import yaml | |
| def load_config(path: str | Path) -> Dict[str, Any]: | |
| """Load YAML config into a plain dictionary.""" | |
| config_path = Path(path) | |
| with config_path.open("r", encoding="utf-8") as handle: | |
| data = yaml.safe_load(handle) or {} | |
| if not isinstance(data, dict): | |
| raise ValueError(f"Config at {config_path} must be a mapping") | |
| return data | |