zhizeng115's picture
Complete four-task dataset and portable code release
7e7a152 verified
Raw History Blame Contribute Delete
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()