Download code/evaluation/fourtask_common_v3/registry.py from zhizeng115/EchoScout-FourTask: direct link, hf CLI and curl.
- Browser
- Download file 666 Bytes
-
https://huggingface.co/datasets/zhizeng115/EchoScout-FourTask/resolve/main/code/evaluation/fourtask_common_v3/registry.py
- Command line
-
hf download hf://datasets/zhizeng115/EchoScout-FourTask/code/evaluation/fourtask_common_v3/registry.py
-
curl -L -o registry.py https://huggingface.co/datasets/zhizeng115/EchoScout-FourTask/resolve/main/code/evaluation/fourtask_common_v3/registry.py
666 Bytes
| """Local checkpoints; trained models are registered by their evaluation entry points.""" | |
| import json | |
| from pathlib import Path | |
| R = Path(__file__).resolve().parents[2] | |
| MODELS = json.loads((R / 'configs/models.json').read_text()) | |
| for profile in MODELS.values(): | |
| path = Path(profile['path']).expanduser() | |
| profile['path'] = str(path if path.is_absolute() else R / path) | |
| def ready(name): | |
| profile = MODELS[name] | |
| if 'parent' in profile: | |
| path = Path(profile['parent']) | |
| return (path/'complete.json').is_file() and (path/'final.safetensors').is_file() and (path/'final.safetensors').stat().st_size > 0 | |
| return Path(profile['path']).is_dir() | |