Spaces:
Running
Running
Download training/cli.py from dvarfe/IQA-Interpretation: direct link, hf CLI and curl.
- Browser
- Download file 593 Bytes
-
https://huggingface.co/spaces/dvarfe/IQA-Interpretation/resolve/main/training/cli.py
- Command line
-
hf download hf://spaces/dvarfe/IQA-Interpretation/training/cli.py
-
curl -L -o cli.py https://huggingface.co/spaces/dvarfe/IQA-Interpretation/resolve/main/training/cli.py
593 Bytes
| """Unified CLI entry point for SAE training.""" | |
| from __future__ import annotations | |
| import sys | |
| from pathlib import Path | |
| from typing import Optional | |
| ROOT = Path(__file__).resolve().parents[1] | |
| if str(ROOT) not in sys.path: | |
| sys.path.insert(0, str(ROOT)) | |
| from log_config import setup_logging | |
| from training.config import parse_args | |
| from training.trainer import Trainer | |
| def main(default_iqa_model: Optional[str] = None) -> None: | |
| setup_logging() | |
| args, backend = parse_args(default_iqa_model=default_iqa_model) | |
| Trainer(backend, args).run() | |
| if __name__ == "__main__": | |
| main() | |