Repository navigation
refactor: admitperf is the package; the cluster moves out - #55
Merged
Merged
Conversation
A policy library that ships a Helm chart is a test harness pretending to be a
library, and keeping both in one repo let that confusion persist for days.
`pip install admitperf` should get you Signal, Policy, Decision, Log and the
reports — not a Kubernetes cluster.
removed infra/ entirely: the chart, the subcharts, the bring-up scripts, the
manifests, the renderer. The cluster that exercises this now lives in
llm-inference-experiments/admitperf_testing, which is module 10 — the
version that actually deployed on real hardware.
removed src/admitperf/load.py and its CLI command. Offering traffic has
nothing to do with deciding whether to admit it, and a load generator
inside a policy library implies the library drives the experiment
rather than being called from someone else's gateway.
The CLI now only reads and writes AdmitPerf logs:
report compare experiments signals policies dashboard demo watch
Two fixes to that surface, both found by using it:
`compare --experiment X` from the wrong directory printed a raw traceback, then
once caught, scanned the whole home directory and listed sixteen unrelated
folders as suggestions. It now lists only NAMED experiments, caps the list, and
says what to run instead.
Report.arm is Report.label. "Arm" is clinical-trial jargon that tells a reader
nothing; the thing on screen is a policy and its runs. The rename collided with
the existing Report.run — the run's NAME, not its display label — which would
have silently handed callers the wrong string.
tests/test_layering.py gains three rules so this cannot drift back: no infra/,
chart/ or k8s-config/ directory, and no load.py in the package.
127 tests, lint clean.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
168 lines documenting infra/render.py, infra/setup/*.sh, LAMBDA_HOST_*, PREFILL_URLS, KV_BACKEND, mooncake and overflow — none of which is in this repo any more, and none of which the package ever read. `grep -r os.environ src/admitperf` returns nothing. The file's own warning applied to itself: "a variable the code does not read is worse than a missing one, because it looks configured." Cluster credentials belong with the cluster, in llm-inference-experiments/admitperf_testing, which has its own .env.example. Two tests keep it that way: the package reads no environment variables — a policy's behaviour comes from its arguments, so two deployments passing identical parameters decide identically. A report naming `kv_threshold 0.90` has to describe something a reader can reconstruct. no .env.example in the package. Co-Authored-By: Claude Opus 5 (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.
pip install admitperfshould get youSignal,Policy,Decision,Logand the reports — not a Kubernetes cluster.−10,609 lines. 129 tests, lint clean.
What's removed
infra/— chart, subcharts, bring-up scripts, manifests, rendererllm-inference-experiments/admitperf_testing, which is module 10 — the version that actually deployed on real hardwaresrc/admitperf/load.pyandadmitperf load.env.example— 168 linesinfra/render.py,LAMBDA_HOST_*,PREFILL_URLS,KV_BACKEND, mooncake, overflow. None of it is in this repo, and none of it was ever read —grep -r os.environ src/admitperfreturns nothing. The file's own warning applied to itself: "a variable the code does not read is worse than a missing one, because it looks configured."The CLI now only reads and writes AdmitPerf logs:
Two fixes found by using it
compare --experiment Xfrom the wrong directory printed a raw traceback. Once caught, it scanned my entire home directory and offered sixteen unrelated folders as suggestions. Now:Report.arm→Report.label. "Arm" is clinical-trial jargon that tells a reader nothing — the thing on screen is a policy and its runs. The rename collided with the existingReport.run(the run's name, not its display label), which would have silently handed callers the wrong string. "Arm" is now gone from the repo except for one comment inpolicy_runs.pyexplaining why.Five layering rules so this cannot drift back
That third one is the load-bearing one. A policy's behaviour comes from its arguments, so two deployments passing identical parameters decide identically — otherwise a report naming
kv_threshold 0.90describes something the reader cannot reconstruct.🤖 Generated with Claude Code