Datasets:
Download scripts/make_jobs.py from Cross-Mergeability/crossarch-accuracy: direct link, hf CLI and curl.
- Browser
- Download file 1.75 kB
-
https://huggingface.co/datasets/Cross-Mergeability/crossarch-accuracy/resolve/main/scripts/make_jobs.py
- Command line
-
hf download hf://datasets/Cross-Mergeability/crossarch-accuracy/scripts/make_jobs.py
-
curl -L -o make_jobs.py https://huggingface.co/datasets/Cross-Mergeability/crossarch-accuracy/resolve/main/scripts/make_jobs.py
1.75 kB
| """Build the evaluation job list, ordered so the barrier-crossover region is answered first. | |
| Priority 0 parents (shared across every pair, so they are never recomputed) | |
| Priority 1 naive (alpha=0.5) merges for pythia pairs near the half-decade crossover | |
| Priority 2 near anchors (<0.3 decades) and far anchors (>1.5 decades) | |
| Priority 3 the rest of the pythia pairs | |
| Priority 4 zh-pythia pairs | |
| """ | |
| import json, pandas as pd, numpy as np | |
| SRC = "/root/crossarch-diagnostics/results/checkpoint_pairs.csv" | |
| OUT = "/root/crossarch-accuracy/results/jobs.jsonl" | |
| d = pd.read_csv(SRC) | |
| jobs = [] | |
| # parents | |
| for fam, g in d.groupby("family"): | |
| for s in sorted(set(g.step_a) | set(g.step_b)): | |
| jobs.append(dict(key=f"{fam}:parent:{s}", prio=0 if fam == "pythia" else 4, fam=fam, kind="parent", step=int(s), | |
| tasks="core_zh" if fam == "zhpythia" else "core")) | |
| def prio(fam, r): | |
| if fam == "zhpythia": return 4 | |
| x = r.log10_step_ratio | |
| if 0.25 <= x <= 1.10: return 1 # the crossover window | |
| if x < 0.25 or x >= 1.50: return 2 # anchors on both sides | |
| return 3 | |
| for _, r in d.iterrows(): | |
| fam = r.family | |
| jobs.append(dict(key=f"{fam}:merge:{int(r.step_a)}:{int(r.step_b)}:0.5", prio=prio(fam, r), | |
| fam=fam, kind="merge", step_a=int(r.step_a), step_b=int(r.step_b), | |
| alpha=0.5, pair=r.pair, log10_step_ratio=float(r.log10_step_ratio), | |
| tasks="core_zh" if fam == "zhpythia" else "core")) | |
| jobs.sort(key=lambda j: (j["prio"], abs(j.get("log10_step_ratio", 0) - 0.6))) | |
| with open(OUT, "w") as f: | |
| for j in jobs: f.write(json.dumps(j) + "\n") | |
| print("jobs", len(jobs), {p: sum(1 for j in jobs if j["prio"] == p) for p in range(5)}) | |