Commit 0221ed3
feat:
Rents a box, sweeps it, prints a $/1M-tokens leaderboard, and recommends the
cheapest serving config that meets a latency bar — building on the optimization
registry from v0.4.0.
- aiod/tune.py (NEW): pure, fully-mockable core — combo enumeration (over the
optimization registry), sizing-based cost projection, $/1M ranking, latency-bar
recommendation, a CostGuard, and the run_sweep orchestration with launch/bench/
sizing injected as deps.
- Cost-safety is the spine: --max-cost is REQUIRED (or an explicit --yes-i-know),
enforced before every launch and around every bench point; teardown is
GUARANTEED on success, exception, AND Ctrl-C — it destroys `inst OR state.load()`
so a box rented during the multi-minute boot is killed even before tune binds
the handle.
- Default sweep = one box, one model load, a concurrency ladder (cheap, since
vLLM batches). Opt-combo sweep (relaunch per combo) is opt-in. Projected
(~) rows order the run but are NEVER the recommendation — the winner is always
a measured point.
- aiod/engine.py: additive `startup_grace` kwarg (default None == today's exact
1200s boot loop; tune passes 540 to early-abort a bad node).
- CLI: `aiod tune <model|profile>` with --max-cost/--max-minutes/--concurrency/
--sweep-opt/--save-profile; README section. Bumps 0.4.0 -> 0.5.0.
39 new tests (teardown-always incl. KeyboardInterrupt + boot-window leak, cost
caps, ranking, projected-never-recommended, startup_grace back-compat) + a
@pytest.mark.live smoke. 205 passing, ruff clean. Additive only.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>aiod tune — benchmark sweep to find the cheapest-per-token config (release v0.5.0) (#11)1 parent 09603fa commit 0221ed3
7 files changed
Lines changed: 2050 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
168 | 208 | | |
169 | 209 | | |
170 | 210 | | |
| |||
0 commit comments