Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Download config_utils.py from SMSD75/SynthScope: direct link, hf CLI and curl.
- Browser
- Download file 571 Bytes
-
https://huggingface.co/spaces/SMSD75/SynthScope/resolve/main/config_utils.py
- Command line
-
hf download hf://spaces/SMSD75/SynthScope/config_utils.py
-
curl -L -o config_utils.py https://huggingface.co/spaces/SMSD75/SynthScope/resolve/main/config_utils.py
571 Bytes
| """Load the Hydra-composed app config from non-Hydra entrypoints (scripts, tests).""" | |
| from pathlib import Path | |
| from omegaconf import DictConfig | |
| _CONF_DIR = Path(__file__).resolve().parent / "conf" | |
| def compose_config(overrides: list[str] | None = None) -> DictConfig: | |
| """Compose ``conf/config.yaml`` with optional Hydra overrides.""" | |
| from hydra import compose, initialize_config_dir | |
| overrides = overrides or [] | |
| with initialize_config_dir(version_base=None, config_dir=str(_CONF_DIR)): | |
| return compose(config_name="config", overrides=overrides) | |