Skip to content

Optimizer: enforce accuracy_sla and latency_sla in candidate eligibility #757

Description

@milindsrivastava1997

Problem

ControllerOptions.accuracy_sla and latency_sla are parsed but unused; nothing stops the optimizer picking an under-provisioned sketch.

Change

Enforce both as candidate eligibility filters (per item, see the AQE-item issue):

  • Accuracy: measured AtomicCostEntry.query_accuracy[metric(family)] vs accuracy_sla, via a fixed per-family metric table in the planner (e.g. CMS → relative_error_mean, KLL → mean_rank_err, HLL → relative_error, CMS-heap → 1 − recall_at_k). 0.0 = unconstrained. Missing measurement = ineligible. Exact accumulators always pass.
  • Latency: estimated query CPU seconds (groups × (query + (n−1)·merge), or the Subtract form) ≤ latency_sla (seconds). 0.0 = unconstrained.

Known gaps (tracked separately): quantile rank error ≠ value error; accuracy is measured on a single instance, not after merging.

Refs #526.

Part of #753.

🤖 Generated with Claude Code

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