Conversation
…nfig (release v0.5.0) 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Designed + implemented + adversarially reviewed via multi-agent workflows; I verified the diff and the cost-safety tests before pushing.
aiod tune <model|profile>rents a box, sweeps it, prints a $/1M-tokens leaderboard, and recommends the cheapest serving config that meets a latency bar — the payoff for the v0.4.0 optimization registry.Cost-safety is the spine (this rents real GPUs)
--max-costis REQUIRED (or an explicit--yes-i-know), enforced before every launch and around every bench point via aCostGuard.inst OR state.load(), so a box rented during the multi-minute boot is killed even before tune binds the handle.startup_gracekwarg onengine.launch(defaultNone== today's exact 1200s loop) lets tune early-abort a bad node.What it sweeps
~) rows order the run + feed the estimate but are never the recommendation — the winner is always a measured point.Surface
aiod tune Qwen/Qwen3-32B --max-cost 5 --concurrency 1,4,8 [--sweep-opt kv-cache-fp8] [--save-profile fast]Tests
39 new (teardown-always incl. KeyboardInterrupt + boot-window leak, cost caps, ranking, projected-never-recommended, startup_grace back-compat) + a
@pytest.mark.livesmoke. 205 passing, ruff clean. Additive only; bumps v0.5.0.Known nits (follow-ups, no billing leak — box always destroyed)
engine.launchcan bill past--max-minutesbefore the next check (bounded by the 1800s ready-timeout).