Repository navigation
Commit b7eb4d6
feat(autotune): S7 cycle orchestrator + verifier seam
run_cycle.py drives dataset → train → eval → markdown report from one TOML
config, so a cycle stops being four hand-typed commands whose flags drifted
between runs. Two flags mattered enough to pin in tests: `--fewshot-top-k 0`
(the tuning replaces few-shot; anything else is a train/inference mismatch)
and unique `--report-suffix` per target (two runs sharing one write the same
file and erase each other).
The report refuses to quote raw EA alone. The v10 base run has 47 transport
holes, so its raw EA reads 37.0% against 48.4% on the 153 questions it really
answered; the markdown carries answered/exceptions next to every number and,
for two targets, a paired comparison over the questions both answered. That
paired block reproduces the hand-rolled scoring exactly — tuned 55.6% vs base
48.4%, +7.2 pp, fixed 24 / broke 13, McNemar exact p = 0.099 — which is an
independent second implementation agreeing, not a copy.
`train` is honest about not being local: mode="remote" prints the runbook
pointer instead of pretending a Colab/Kaggle session can be started here.
nl_sql.autotune.verifiers is the answer → pass/fail seam the track needs for
the S6 levers (execution-filter of gold, teacher normalisation). It mirrors
the eval runner deliberately: candidate SQL through the AST guards, gold
unguarded, comparison through safe_compare_pred so a candidate that never
executed cannot be blessed by an empty gold (the qid-518 class, pinned by a
mutation-checked test).
Config is TOML, not the YAML the plan sketched: tomllib is stdlib, so this
adds no dependency and no type stubs, and comments still survive.
Also un-breaks CI: colab_serve.ipynb landed in efcf46e with an unused import
and an unguarded open(), so `ruff check`/`ruff format --check` have been red
at HEAD since. Fixed in place, plus a note that the vLLM path in that cell is
dead and should not be retried.
Gate §7.3 green: ruff, format, mypy strict, pytest 550 passed / 14 skipped
cov 91.05%, hygiene, no_raw_compare.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent efcf46e commit b7eb4d6
7 files changed
Lines changed: 1117 additions & 24 deletions
File tree
- configs/autotune
- scripts/autotune
- colab
- src/nl_sql/autotune
- tests
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | 2 | | |
18 | 3 | | |
19 | 4 | | |
| 5 | + | |
20 | 6 | | |
21 | 7 | | |
22 | 8 | | |
| |||
38 | 24 | | |
39 | 25 | | |
40 | 26 | | |
| 27 | + | |
41 | 28 | | |
42 | 29 | | |
43 | 30 | | |
| |||
47 | 34 | | |
48 | 35 | | |
49 | 36 | | |
50 | | - | |
| 37 | + | |
51 | 38 | | |
52 | 39 | | |
53 | 40 | | |
54 | 41 | | |
55 | 42 | | |
| 43 | + | |
56 | 44 | | |
57 | 45 | | |
58 | 46 | | |
| |||
78 | 66 | | |
79 | 67 | | |
80 | 68 | | |
81 | | - | |
| 69 | + | |
82 | 70 | | |
83 | 71 | | |
84 | 72 | | |
85 | 73 | | |
86 | 74 | | |
| 75 | + | |
87 | 76 | | |
88 | 77 | | |
89 | 78 | | |
| |||
106 | 95 | | |
107 | 96 | | |
108 | 97 | | |
109 | | - | |
| 98 | + | |
110 | 99 | | |
111 | 100 | | |
112 | 101 | | |
113 | 102 | | |
114 | 103 | | |
| 104 | + | |
115 | 105 | | |
116 | 106 | | |
117 | 107 | | |
118 | 108 | | |
119 | | - | |
120 | 109 | | |
121 | 110 | | |
122 | 111 | | |
123 | 112 | | |
124 | 113 | | |
125 | 114 | | |
126 | 115 | | |
127 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
| 157 | + | |
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
| 229 | + | |
230 | 230 | | |
231 | 231 | | |
232 | | - | |
233 | | - | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
0 commit comments