Download code/plans/fa2/hard_eval.py from thucdangvan020999/aurora-wake-model: direct link, hf CLI and curl.
- Browser
- Download file 770 Bytes
-
https://huggingface.co/thucdangvan020999/aurora-wake-model/resolve/main/code/plans/fa2/hard_eval.py
- Command line
-
hf download hf://thucdangvan020999/aurora-wake-model/code/plans/fa2/hard_eval.py
-
curl -L -o hard_eval.py https://huggingface.co/thucdangvan020999/aurora-wake-model/resolve/main/code/plans/fa2/hard_eval.py
770 Bytes
| #!/usr/bin/env python3 | |
| """HARD dev proxy: 290 en_dev2 positives with the lowest en17 peak. Misses on HARD (and total) per TAG@THR. | |
| python hard_eval.py TAG:THR [TAG:THR ...]""" | |
| import sys | |
| import numpy as np | |
| sys.path.insert(0, __import__("os").path.dirname(__file__)); import vf_score as V | |
| def peaks(tag): | |
| z = V.load(tag); out = [] | |
| for d, e in zip(z["pos"], z["pos_end"]): | |
| t, tm = V.track(d, 110); m = (tm >= e) & (tm <= e + 1.0); out.append(t[m].max() if m.any() else 0.0) | |
| return np.array(out) | |
| H = np.argsort(peaks("en17"), kind="stable")[:290] | |
| for a in sys.argv[1:]: | |
| tag, thr = a.split(":"); p = peaks(tag); thr = float(thr) | |
| print(f"{tag}@{thr}: HARD miss {(p[H] < thr).sum()}/290, total miss {(p < thr).sum()}/{len(p)}", flush=True) | |