Skip to content

Optimizer: move sketch-bench #129 MILP into asap-planner-rs (--planner milp) #753

Description

@milindsrivastava1997

Summary

sketch-bench PR #129 (rqe-optimizer) adds a HiGHS-backed MILP that picks sketch deployments (family, params, window, slide) for a repeating-query workload and shares deployments across compatible queries. Its output is meant to feed ASAPQuery's planner, so the solver should live in asap-planner-rs as mip_assign. That fills the Phase 3a slot in .design_docs/optimizer-v1-implementation-plan.md and closes the cross-AQE sharing gap (#650).

Goal

A production planner path, asap-planner --planner legacy|milp (default legacy), that solves the sharing-aware MILP over ASAPQuery's own candidates and cost model and emits deployable streaming_config.yaml / inference_config.yaml.

PR order

# PR Issues Notes
1 Retention fix #760 Standalone asap_types + translator bug. First: legacy already dedups configs across queries, so last-ref-wins may bite today.
2 Optimizer items + window rules #755 + #758 Same code (AQE struct, extract_aqes, window_candidates); T % S needs per-item T. Base for the rest.
3 Label-set facts #756 Independent of 2; can run in parallel.
4 SLA filters #757 Needs 2 (items carry SLAs).
5 avg rewrite + remove EXACT #419 + #759 One PR: removing EXACT alone makes every avg unservable.
6 Sketch families #762 + #763 Both change the candidate family set; #763 is tiny.
7 Subtract cost #765 After 2 (T ≠ W possible); before the MILP (objective depends on it).
8 Candidate dump + diff vs sketch-bench #129 #767 After 2, 4, 5, 6 so remaining diffs are real bugs.
9 MILP #761 (+ #768 results in PR description)
10 Planner integration #764 Last code PR.
— Docs #769 After 9.
#760 ─────────────────────────────────────────┐
#755+#758 ─┬─ #757 ─┐                         │
           ├─ #765  ├─ #767 ── #761(+#768) ── #764 ── #769
#756 ──────┤        │
#419+#759 ─┤        │
#762+#763 ─┘────────┘
sketch-bench#132 ──┘ (feeds #757/#762 data)

Related

#650, #649, #652, #750, #526, #525, #563, #533; sketch-bench #129

🤖 Generated with Claude Code


Tracking

Design decisions: first comment below (kept in sync with the issues listed here).

Cost data

Model changes (before the MILP)

Verification before the MILP

MILP

Docs

Known model limitations / follow-ups

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions