Repository navigation
feat(rqe-optimizer): plan output with active deployments and instance counts - #168
Merged
Merged
Conversation
… counts MilpSolution now lists only the active deployments, renumbered, each with its retained instance count, and per RAQE the serving deployment index and merged instance count. Drops the candidate-index mapping; adds the solved objective value. sketch-bench#143 S8. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
Code reviewAll findings are in Correctness
Cleanups
🤖 Generated with Claude Code |
… once Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…use objective.value Co-Authored-By: Claude Opus 5.5 <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.
Implements S8 (plan output) of #143. ASAPQuery's A3 builds
StreamingConfig/InferenceConfigdirectly from this.Interface change (A3 depends on this)
minimizestill returnsMilpSolution, which now has these fields:MilpSolution::mapping(indexes into the full candidate list) is removed.Design decisions (settled in a grilling session; please approve each)
MilpSolutionand make it richer, rather than adding a newPlantype.minimize's signature does not change.mapping. One indexing scheme per struct:PlannedRaqe::deploymentindexesMilpSolution::deployments, which holds only the active deployments, in order of the first RAQE each serves.retained_instance_count = x/y + (L_max − x)/y + 1, in windows per group (per sketch). It is not multiplied bycard(G)(or by 1 for shared sketches such as HydraKLL).L_maxis the longest lookback among the RAQEs the deployment serves. The key tracker keeps the same window count, so it has no field of its own.merged_instance_count = L/xper RAQE. There is no query-method enum. With Subtract deferred (S9),n == 1means Direct andn > 1means Merge. Add the enum together with Subtract.plan_cost.query_latency_msand is not copied ontoPlannedRaqe.minimize_coston an EC2 family withAUCCost { w_cpu, w_mem }and removed the pricing snapshot. The plan reportsPlanCost(CPU and memory per phase). There is no stored objective value, so it can't go stale; callers computeobjective.value(&plan_cost)from theobjectivethey passed in. If ASAPQuery wants a dollar figure, it can multiply on its side.Mappingoutputs, since ASAPQuery calls onlyminimize. A3 and pinning the sketch-bench rev in ASAPQuery come after this merges.Changes
rqe-optimizer/src/milp.rs: the new fields, aplanhelper that renumbers active deployments and computes both counts, MILP tests switched frommappingto the planned fields, and a new testplan_lists_active_deployments_with_their_instance_counts.rqe-optimizer/examples/small_problem.rs:--milpprints each planned deployment with its retained count and key-tracker flag, plus each RAQE's deployment and merged count.Testing
cargo test -p rqe-optimizer: 54 passed.cargo clippy --all-targets -D warnings: clean.small_problem --milpon a real cost table: for example, kll-percall with x=720 s, y=60 s, serving lookbacks up to 1 d, retains 12 + 1429 = 1441 windows, andlatency_p99_1dmerges 120.🤖 Generated with Claude Code