Skip to content

Model per-family quantile accuracy metrics in optimizer RAQEs #167

Closed

Description

@milindsrivastava1997

This was generated by AI during triage.

Problem

DDSketch benchmark rows now report mean_relative_value_error, while quantile RAQEs request mean_rank_err universally. Raqe::accuracy_ok_for treats a missing requested metric as failing, so DDSketch is never a feasible candidate when its family is enabled.

Desired outcome

Represent an RAQE accuracy requirement in a way that can evaluate each candidate family against its applicable metric and SLA, without replacing KLL’s rank-error requirement or weakening missing-metric handling.

Evidence

  • rqe-optimizer/examples/small_problem.rs sets quantile RAQEs to mean_rank_err.
  • rqe-optimizer/src/lib.rs::Raqe::accuracy_ok_for rejects a missing metric.
  • DDSketch cost rows now provide only mean_relative_value_error.

Acceptance criteria

  • DDSketch can be evaluated against a relative-value-error SLA.
  • KLL continues to be evaluated against a rank-error SLA.
  • A missing required metric remains a failure.
  • Tests cover both candidate families for one quantile RAQE.

Activity

  1. milindsrivastava1997 commented on Oct 7, 2026

    @milindsrivastava1997
    ContributorAuthor

    Agreed scope

    1. Families declare their accuracy metric and direction. FamilyProperties gains Option<(&str, AccuracyDirection)>: e.g. kll-percall → mean_rank_err (lower), dd → mean_relative_value_error (lower), top-k → precision_at_k (higher). Names mirror the comparators export_rqe_optimizer_costs.sh picks per family.
    2. RAQE keeps one scalar accuracy_sla. accuracy_metric and accuracy_direction are removed; each candidate is checked by its family's metric against that SLA. Caveat that one number means different guarantees for KLL vs DD: rqe-optimizer: one quantile accuracy SLA means different guarantees for KLL and DD #172.
    3. Exact accumulators are checked like any family (relative_error, measures ~0). The key tracker exact-delta-set gets None; it is never a candidate.
    4. A missing metric panics: a row or merge bracket lacking its family's metric, or a None family being checked. This includes DD's intentional omission (every true quantile 0 or every probe unanswered); the message names that cause.
    5. AutoSketch's accuracy oracle callback is removed. search calls raqe.accuracy_ok_for(config, 1), the same check as the MILP.
    6. dd is added to DEPLOYABLE_FAMILIES.
    7. validate_facts rejects a non-finite accuracy_sla.
    8. Tests: one quantile RAQE checked against a KLL row and a DD row, each by its own metric; #[should_panic] for a DD row missing its metric; small_problem.rs updated, its metric constants removed.

    🤖 Generated with Claude Code

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions