Download scripts/experiment_guard.py from arushsinghal/setu-neural-eeg: direct link, hf CLI and curl.
- Browser
- Download file 549 Bytes
-
https://huggingface.co/arushsinghal/setu-neural-eeg/resolve/main/scripts/experiment_guard.py
- Command line
-
hf download hf://arushsinghal/setu-neural-eeg/scripts/experiment_guard.py
-
curl -L -o experiment_guard.py https://huggingface.co/arushsinghal/setu-neural-eeg/resolve/main/scripts/experiment_guard.py
549 Bytes
| from pathlib import Path | |
| import json,datetime,os | |
| def assert_tuning_open(): | |
| if Path('reports/frozen_selection.json').exists(): | |
| raise RuntimeError('Model selection is frozen and test labels may be open. Use independent new data for further tuning.') | |
| p=Path(os.environ.get('SETU_BUDGET_FILE','experiments/run_budget.json')) | |
| if p.exists() and datetime.datetime.now(datetime.timezone.utc)>=datetime.datetime.fromisoformat(json.load(open(p))['deadline_utc']): | |
| raise RuntimeError('Active research budget has expired. No further training started.') | |