Skip to content

Tracker: export #777 eval plans for ASAPQuery's end-to-end runs #204

Closed

Description

@milindsrivastava1997

Goal

Run ASAP's plans from the AutoSketch vs. ASAP evaluation (ProjectASAP/ASAPQuery#777, results in #203) end to end with ASAPQuery's experiment_run_e2e. ASAPQuery converts a saved plan into StreamingConfig / InferenceConfig; it does not re-solve. This issue covers what sketch-bench has to emit for that.

ASAPQuery side: ProjectASAP/ASAPQuery#824

Why the current outputs aren't enough

  • autosketch_vs_asap --no-chosen drops the plans. Even with chosen, a per-RQE entry has the sketch, params, window and slide, but not the deployment's capability, metric or grouping (deployment_grouping appears only on roll-ups and Hydra).
  • The workload tables (inputs/tables/*.json, scripts/export_autosketch_eval_table.py) have no PromQL. Grouping is shorthand in stream (job/value, label_0/increment, series/dist), and the metric's label schema isn't written anywhere.

TODO

  • P1. Plan file (done in eval: AutoSketch vs. ASAP with Hydra candidates and a roll-up ablation (§6.3) #203: rqe-optimizer/results/autosketch-vs-asap-hydra/plans/<table>.plans.json.gz, hand-written JSON; see the README's "Plans" section)
    • autosketch_vs_asap writes one self-contained plan per exported point: a deployments list (capability, metric, grouping labels, spatial filter, sketch, sketch_config, window_ms, slide_ms) plus an RQE id → deployment index map.
    • Prefer #[derive(Serialize, Deserialize)] on the rqe-optimizer types the plan already uses (Deployment, PlannedDeployment, PlannedRaqe) over a hand-written JSON shape, so ASAPQuery reads the same types it already depends on.
    • Points to export: ASAP's cheapest plan per weight setting; SLA points optional (see Decisions).
  • P2. PromQL and labels in the workload table (done in eval: PromQL and metrics for end-to-end runs in classic tables (#204 P2) #208: workloads[0].e2e in the four classic tables)
    • export_autosketch_eval_table.py --synthetic adds one workload-level block, e2e, that the runner does not read. The rest of the table stays byte-identical, so the committed plans in plans/ still match it. (The existing schemas and per-RQE grouping fields are not reused for classic: autosketch_vs_asap reads them, and filling them puts a stream's groupings on one metric, which allows roll-ups and changes the plans.)
    • e2e.queries: [{promql, interval_secs, rqes: [ids]}]. A list because a binary query (template 10) reads two RQEs and has no ids of its own (it is deduplicated into template 5's p0.9 and p0.5). This is also the query → aggregations shape the inference config wants.
    • e2e.metrics: data (gauge) and data_total (counter), each with labels in the schemas format: job (cardinality 10) and label_0 (cardinality 1000, child_of: job, so 1e4 series), plus 200 samples/s per series and the value shape (Zipf 1.1 keys, Pareto a = 2).
    • No per-RQE grouping is needed: ASAPQuery reads each query's grouping, statistic and top-k key from the PromQL with its existing extractor, given e2e.metrics' labels.
    • Check: the regenerated classic tables minus e2e equal the committed ones.
    • Templates 1–10 (classic) first; the PromQL is listed in ASAPQuery#777 §6.
    • Query id → PromQL (w from range, q from the _p{q} suffix):
      query_id PromQL
      sum_by_job sum by (job) (data)
      quantile_by_job_p{q} quantile by (job) (q, data)
      topk32_sum_by_label0_sum_over_time topk(32, sum by (label_0) (sum_over_time(data[w])))
      sum_over_time sum_over_time(data[w])
      quantile_over_time_p{q} quantile_over_time(q, data[w])
      rate rate(data_total[w])
      sum_by_job_rate sum by (job) (rate(data_total[w]))
      sum_by_job_sum_over_time sum by (job) (sum_over_time(data[w]))
      topk32_sum_by_label0_rate topk(32, sum by (label_0) (rate(data_total[w])))
      (template 10) quantile_over_time(0.9, data[w]) / quantile_over_time(0.5, data[w]) → the p0.9 and p0.5 RQEs
  • P3. Rerun and commit plans (done in eval: AutoSketch vs. ASAP with Hydra candidates and a roll-up ablation (§6.3) #203: every table in plan.tsv, cheapest and SLA plans per method and weight setting)
    • Rerun without --no-chosen, classic r = 1, m = 1 first, then the rest of plan.tsv as needed.
    • Commit the plan files next to the results in rqe-optimizer/results/autosketch-vs-asap-hydra/.

Decisions

Settled 2026-10-11:

  • Arrival rate. e2e runs at the eval's 2e6 samples/s, so the committed plans are used as is.
  • Where PromQL lives. sketch-bench's export script, next to the templates (P2). ASAPQuery does not keep its own copy.
  • Template 10 is included. In the classic ASAP plan its two operands share one deployment. If a plan splits them, ASAPQuery's converter refuses the query (QueryOnTwoDeployments), which is acceptable.
  • Gauge and counter are split. data is a gauge (value and dist streams: sums, quantiles, top-k by sum); data_total is a counter (increment stream: rate). The RQEs already put these on different streams, so sharing and the plans don't change. e2e ingests both, each at 2e6 samples/s.
  • Spatial templates stay sum by (job) (data). We assume every series has a sample at every scrape, so the instant query and the eval's 1 s window agree.

Open (none left):

Out of scope: roll-up and Hydra plans. The engine can't serve them yet (ASAPQuery#814), so multi-grouping and all are not exported for now.

Activity

  1. milindsrivastava1997 commented on Oct 11, 2026

    @milindsrivastava1997
    ContributorAuthor

    P1 and P3 done in #203, P2 in #208. The ASAPQuery side continues in ProjectASAP/ASAPQuery#824.

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