Skip to content

eval: AutoSketch vs. ASAP on the synthetic mixed set (cost by use; frontier and SLA versions) - #138

Merged
zzylol merged 20 commits into
mainfrom
eval/autosketch-vs-asap
Oct 9, 2026
Merged

zzylol merged 20 commits into
mainfrom
eval/autosketch-vs-asap

Conversation

@zzylol

@zzylol zzylol commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

What

The AutoSketch vs. ASAP planner evaluation (ProjectASAP/ASAPQuery#777) on the synthetic mixed template set. It contains everything behind its three figures: code, scripts, inputs (including the raw approxbench records), results and figures.

Based on main, which has #188 (cost by use and batch latency).

Figures

  • Version 1, no SLA: each method's cost–latency frontier, in rqe-optimizer/results/autosketch-vs-asap-synthetic/fig_frontier.png.
  • Version 2, batch latency SLA: cost vs. SLA, in rqe-optimizer/results/autosketch-vs-asap-synthetic-sla/fig_cost_vs_sla.png.
  • Planning time vs. RQEs: AutoSketch shown with its measured benchmark time, in rqe-optimizer/results/autosketch-vs-asap-synthetic/fig_planning_time.png.

Setup

  • Methods:
    • ASAP: minimize_usage_cost with sharing.
    • PerQuery-CostAware: the same MILP, each RQE limited to its own candidates, so nothing is shared.
    • AutoSketch-Adapted: Algorithm 4 per RQE, its plan priced the same way.
  • Cost by use (rqe-optimizer: MILP on cost by use, with batch latency (reported, or as an SLA) #188), two weight settings: CPU only (vCPU), and Fargate prices ($/hour). Costs are absolute.
  • Latency: the plan's batch latency.
    • Version 1 sweeps 12 latency bounds plus AutoSketch's latency.
    • Version 2 uses SLAs of {100, 300, 1000, 3000, 10000} ms.
  • Workloads: the mixed set, 50 RQEs; shared replicas r = 8, 92 RQEs; metrics m ∈ {8, 16}, 400 and 800 RQEs. Accuracy target p95.
  • AutoSketch's planning time is its search plus its measured benchmark: each distinct probed (config, data shape) runs approxbench's accuracy benchmark at 1e8 items, including the exact baseline and scoring, serially on an idle machine. It is charged once per metric. 60 s per probe appears only as a reference.

Results

All costs CPU-only, in vCPU. AutoSketch's latency is 1011 ms everywhere.

Workload ASAP cheapest (latency) PerQuery cheapest (latency) AutoSketch ASAP at 1011 ms ASAP at 100 ms SLA
mixed (50) 3.32 (12.1 s) 9.55 (3.84 s) 3410 5.12 34.5
r = 8 (92) 3.39 (2.94 s) 16.7 (3.84 s) 4089 5.15 34.5
m = 8 (400) 26.5 (12.1 s) 76.4 (3.84 s) 27,280 41.0 276
m = 16 (800) 53.1 (12.1 s) 153 (3.84 s) 54,560 81.9 553

Planning time at 50 / 400 / 800 RQEs:

  • ASAP: 0.76 / 6.8 / 14.7 s.
  • AutoSketch: 212 / 1697 / 3394 s, almost all of it measured benchmark.

No RQE was dropped and every sanity check passed: ASAP ≤ PerQuery, ASAP ≤ AutoSketch, frontiers monotone, every SLA met.

Contents

  • Code: rqe-optimizer/examples/autosketch_vs_asap.rs, the runner.
  • Scripts:
    • export_autosketch_eval_table.py and its test (synthetic tables);
    • run_autosketch_vs_asap_synthetic.sh;
    • autosketch_benchmark_time.py;
    • plot_autosketch_vs_asap_synthetic.py;
    • plot_autosketch_vs_asap_sla.py.
  • Inputs: rqe-optimizer/results/autosketch-vs-asap-inputs/.
    • saturation/: the sketch-bench study on asap_sketchlib 0.3.0. It has the cost table (sketches and exact aggregations) and the accuracy curves; the runner reads it as --saturation-dir.
    • tables/: the four workload tables and plan.tsv.
    • raw/: the raw approxbench records behind saturation/, gzipped (920 KB), with a README mapping each file to its machine, arguments and run time. Rerunning them is 0.77 h of machine time in all, run in parallel on 5 machines (about 20–30 minutes of wall time; the serial cost table alone is 17 minutes).
  • Results:
    • results/autosketch-vs-asap-synthetic/: version 1.
    • results/autosketch-vs-asap-synthetic-sla/: version 2.
    • Each has results JSON without per-RQE choices, a summary, a README, AutoSketch's benchmark times, and its figures.

Rerunning one workload from the committed inputs reproduces the committed results exactly. The READMEs give the steps.

Not here

The Alibaba and Google traces (with 6h and 24h windows, ASAPQuery #812) are to be rerun on this model in a follow-up.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FhcWJExZcmVqS6r6rEtjis

zzylol added a commit that referenced this pull request Oct 5, 2026
The user dropped FewestPlans from the evaluation (ProjectASAP/ASAPQuery#777).
Remove milp::minimize_deployments and MilpBounds::max_active_deployments,
FewestPlans from the runner and its sanity checks, and its column from the
plots and summaries. milp.rs and small_problem.rs are back to #138's versions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@zzylol
zzylol force-pushed the eval/autosketch-vs-asap branch from b12111f to f293b73 Compare October 5, 2026 15:48
@zzylol zzylol changed the title Evaluate AutoSketch vs ASAP planner on trace and synthetic workloads Evaluate AutoSketch vs the ASAP planner on the trace workloads Oct 5, 2026
zzylol added a commit that referenced this pull request Oct 5, 2026
…nd PerQuery

- Runner: a synthetic subcommand reading a table from
  export_autosketch_eval_table.py --synthetic (--target, --replicas,
  --no-chosen) and a wider synthetic SLA grid. PerQuery-CostAware now
  solves each RQE under the same SLA as ASAP, with a sanity check that
  ASAP costs no more.
- export_autosketch_eval_table.py --synthetic: the 10 PromQL templates of
  ProjectASAP/ASAPQuery#777 §6 as RQEs, with per-RQE accuracy lookups.
- run/plot scripts for the synthetic sweep.

Rebased onto #138 (f293b73), which dropped the example and scaling
workloads; FewestPlans is not included.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@zzylol
zzylol force-pushed the eval/autosketch-vs-asap branch from f293b73 to 8b59466 Compare October 6, 2026 23:43
@zzylol zzylol changed the title Evaluate AutoSketch vs the ASAP planner on the trace workloads rqe-optimizer: evaluate AutoSketch vs ASAP on the trace workloads Oct 6, 2026
@zzylol
zzylol force-pushed the eval/autosketch-vs-asap branch from 8b59466 to 944f8fc Compare October 7, 2026 17:52
@zzylol
zzylol changed the base branch from main to 158-merged-curves October 7, 2026 17:52
@zzylol
zzylol force-pushed the eval/autosketch-vs-asap branch from 944f8fc to 3397af3 Compare October 7, 2026 18:14
@zzylol
zzylol force-pushed the 158-merged-curves branch from f06e052 to 5f2a72c Compare October 7, 2026 18:15
@zzylol
zzylol force-pushed the eval/autosketch-vs-asap branch from 3397af3 to c76d555 Compare October 7, 2026 18:15
zzylol added a commit that referenced this pull request Oct 7, 2026
Restacked on #138, which reads costs and accuracy from the saturation study
like the planner (#174). The synthetic tables now hold the workload only:
RQEs, streams, targets and each family's data shape. The data is the cost
table's, imported from study_saturation (COST_THETA, COST_KEYS = C,
COST_PARETO_ALPHA for quantiles). Sum and rate queries name exact
accumulators. --synthetic takes no curves, costs or --exact-costs. The
traces mode is unchanged, and per-query CPU from cost records is dropped
because the runner no longer reads it. The run script passes
SATURATION_DIR to the runner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@zzylol
zzylol force-pushed the 158-merged-curves branch from 5f2a72c to 659ddab Compare October 7, 2026 18:30
@zzylol
zzylol force-pushed the eval/autosketch-vs-asap branch from c76d555 to da8259d Compare October 7, 2026 18:30
zzylol added a commit that referenced this pull request Oct 7, 2026
Restacked on #138, which reads costs and accuracy from the saturation study
like the planner (#174). The synthetic tables now hold the workload only:
RQEs, streams, targets and each family's data shape. The data is the cost
table's, imported from study_saturation (COST_THETA, COST_KEYS = C,
COST_PARETO_ALPHA for quantiles). Sum and rate queries name exact
accumulators. --synthetic takes no curves, costs or --exact-costs. The
traces mode is unchanged, and per-query CPU from cost records is dropped
because the runner no longer reads it. The run script passes
SATURATION_DIR to the runner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zzylol added a commit that referenced this pull request Oct 7, 2026
ProjectASAP/ASAPQuery#777 (paper §6.3), consolidating #138, #139 and #141.

- rqe-optimizer/examples/autosketch_vs_asap.rs: ASAP (milp::minimize),
  PerQuery-CostAware and AutoSketch-Adapted on one synthetic table. Costs and
  accuracy come from --saturation-dir, as the planner reads them:
  SaturationCurves::accuracy for ASAP (merge curves for KLL and top-k,
  #179), autosketch_accuracy for AutoSketch, and the one-study cost table
  (#178). Each run is scored by analytical_cost_model::score at #777's two
  weight settings and the SLA grid.
- scripts/export_autosketch_eval_table.py --synthetic: one workload-only
  table per grid point, plus plan.tsv. The data constants come from
  study_saturation's COST_*.
- scripts/run_autosketch_vs_asap_synthetic.sh and
  plot_autosketch_vs_asap_synthetic.py: run the grid, then plot.
- scripts/profiling_time.py and the synthetic results README: ASAP's
  one-time profiling time, and how to reproduce.

The trace workloads are left out for now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@zzylol
zzylol force-pushed the eval/autosketch-vs-asap branch from da8259d to 412f915 Compare October 7, 2026 19:00
@zzylol
zzylol changed the base branch from 158-merged-curves to main October 7, 2026 19:00
@zzylol zzylol changed the title rqe-optimizer: evaluate AutoSketch vs ASAP on the trace workloads rqe-optimizer: evaluate AutoSketch vs ASAP on the synthetic workload Oct 7, 2026
zzylol added a commit that referenced this pull request Oct 7, 2026
… workloads

ProjectASAP/ASAPQuery#777 (paper §6.3), consolidating #138, #139 and #141.

- rqe-optimizer/examples/autosketch_vs_asap.rs (traces and synthetic): ASAP
  (milp::minimize), PerQuery-CostAware and AutoSketch-Adapted. Costs and
  accuracy come from --saturation-dir, as the planner reads them:
  SaturationCurves::accuracy for ASAP (merge curves for KLL and top-k,
  #179), autosketch_accuracy for AutoSketch, and the one-study cost table
  (#178). Each run is scored by analytical_cost_model::score at #777's two
  weight settings and the SLA grid.
- scripts/run_autosketch_vs_asap.sh and plot_autosketch_vs_asap.py: the
  trace workloads alibaba_v2022 and google_2011. boom is left out for now.
- scripts/export_autosketch_eval_table.py --synthetic: one workload-only
  table per grid point, plus plan.tsv. The data constants come from
  study_saturation's COST_*. The traces path is unchanged from main.
- scripts/run_autosketch_vs_asap_synthetic.sh and
  plot_autosketch_vs_asap_synthetic.py: run the synthetic grid, then plot.
- scripts/profiling_time.py and the results README: ASAP's one-time
  profiling time, and how to reproduce.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@zzylol
zzylol force-pushed the eval/autosketch-vs-asap branch from 412f915 to 9db7c08 Compare October 7, 2026 19:03
@zzylol zzylol changed the title rqe-optimizer: evaluate AutoSketch vs ASAP on the synthetic workload rqe-optimizer: evaluate AutoSketch vs ASAP on the synthetic and trace workloads Oct 7, 2026
zzylol added a commit that referenced this pull request Oct 7, 2026
… workloads

ProjectASAP/ASAPQuery#777 (paper §6.3), consolidating #138, #139 and #141.

- rqe-optimizer/examples/autosketch_vs_asap.rs (traces and synthetic): ASAP
  (milp::minimize), PerQuery-CostAware and AutoSketch-Adapted. Costs and
  accuracy come from --saturation-dir, as the planner reads them:
  SaturationCurves::accuracy for ASAP (merge curves for KLL and top-k,
  #179), autosketch_accuracy for AutoSketch, and the one-study cost table
  (#178). Each run is scored by analytical_cost_model::score at #777's two
  weight settings and the SLA grid.
- scripts/run_autosketch_vs_asap.sh and plot_autosketch_vs_asap.py: the
  trace workloads alibaba_v2022 and google_2011. boom is left out for now.
- scripts/export_autosketch_eval_table.py --synthetic: one workload-only
  table per grid point, plus plan.tsv. The data constants come from
  study_saturation's COST_*. The traces path is unchanged from main.
- scripts/run_autosketch_vs_asap_synthetic.sh and
  plot_autosketch_vs_asap_synthetic.py: run the synthetic grid, then plot.
- scripts/profiling_time.py and the results README: ASAP's one-time
  profiling time, and how to reproduce.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@zzylol
zzylol force-pushed the eval/autosketch-vs-asap branch from 9db7c08 to 42848af Compare October 7, 2026 19:19
zzylol added a commit that referenced this pull request Oct 7, 2026
… the accuracy source

From review on #138:
- A traces key query (sum by key) keeps one exact accumulator per key: its
  groups are the window's keys, not the table's one sketch. A stream's
  card(g) is the largest over its RQEs.
- AutoSketch's benchmark lower bound uses one query of one instance, not
  the stream's q_r of them.
- --weights that names none of the weight settings is an error.
- The chosen report lists each RQE's accuracy source (#180's
  accuracy_with_source).
- Drop a duplicated BoomTest; capability_of's comment matches the code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FhcWJExZcmVqS6r6rEtjis
zzylol added a commit that referenced this pull request Oct 7, 2026
… workloads

ProjectASAP/ASAPQuery#777 (paper §6.3), consolidating #138, #139 and #141.

- rqe-optimizer/examples/autosketch_vs_asap.rs (traces and synthetic): ASAP
  (milp::minimize), PerQuery-CostAware and AutoSketch-Adapted. Costs and
  accuracy come from --saturation-dir, as the planner reads them:
  SaturationCurves::accuracy for ASAP (merge curves for KLL and top-k,
  #179), autosketch_accuracy for AutoSketch, and the one-study cost table
  (#178). Each run is scored by analytical_cost_model::score at #777's two
  weight settings and the SLA grid.
- scripts/run_autosketch_vs_asap.sh and plot_autosketch_vs_asap.py: the
  trace workloads alibaba_v2022 and google_2011. boom is left out for now.
- scripts/export_autosketch_eval_table.py --synthetic: one workload-only
  table per grid point, plus plan.tsv. The data constants come from
  study_saturation's COST_*. The traces path is unchanged from main.
- scripts/run_autosketch_vs_asap_synthetic.sh and
  plot_autosketch_vs_asap_synthetic.py: run the synthetic grid, then plot.
- scripts/profiling_time.py and the results README: ASAP's one-time
  profiling time, and how to reproduce.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@zzylol
zzylol force-pushed the eval/autosketch-vs-asap branch from 42848af to d77cdbd Compare October 7, 2026 19:56
zzylol added a commit that referenced this pull request Oct 7, 2026
… the accuracy source

From review on #138:
- A traces key query (sum by key) keeps one exact accumulator per key: its
  groups are the window's keys, not the table's one sketch. A stream's
  card(g) is the largest over its RQEs.
- AutoSketch's benchmark lower bound uses one query of one instance, not
  the stream's q_r of them.
- --weights that names none of the weight settings is an error.
- The chosen report lists each RQE's accuracy source (#180's
  accuracy_with_source).
- Drop a duplicated BoomTest; capability_of's comment matches the code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FhcWJExZcmVqS6r6rEtjis
zzylol and others added 20 commits October 9, 2026 18:17
… workloads

ProjectASAP/ASAPQuery#777 (paper §6.3), consolidating #138, #139 and #141.

- rqe-optimizer/examples/autosketch_vs_asap.rs (traces and synthetic): ASAP
  (milp::minimize), PerQuery-CostAware and AutoSketch-Adapted. Costs and
  accuracy come from --saturation-dir, as the planner reads them:
  SaturationCurves::accuracy for ASAP (merge curves for KLL and top-k,
  #179), autosketch_accuracy for AutoSketch, and the one-study cost table
  (#178). Each run is scored by analytical_cost_model::score at #777's two
  weight settings and the SLA grid.
- scripts/run_autosketch_vs_asap.sh and plot_autosketch_vs_asap.py: the
  trace workloads alibaba_v2022 and google_2011. boom is left out for now.
- scripts/export_autosketch_eval_table.py --synthetic: one workload-only
  table per grid point, plus plan.tsv. The data constants come from
  study_saturation's COST_*. The traces path is unchanged from main.
- scripts/run_autosketch_vs_asap_synthetic.sh and
  plot_autosketch_vs_asap_synthetic.py: run the synthetic grid, then plot.
- scripts/profiling_time.py and the results README: ASAP's one-time
  profiling time, and how to reproduce.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the accuracy source

From review on #138:
- A traces key query (sum by key) keeps one exact accumulator per key: its
  groups are the window's keys, not the table's one sketch. A stream's
  card(g) is the largest over its RQEs.
- AutoSketch's benchmark lower bound uses one query of one instance, not
  the stream's q_r of them.
- --weights that names none of the weight settings is an error.
- The chosen report lists each RQE's accuracy source (#180's
  accuracy_with_source).
- Drop a duplicated BoomTest; capability_of's comment matches the code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FhcWJExZcmVqS6r6rEtjis
…Sketch's benchmark

- One accuracy level for every workload, synthetic and traces: 95% in
  each family's metric (rank, relative value and relative error at most
  0.05; top-k precision at least 0.95). The strictness dimension is gone.
- fig_objective_vs_latency joins only points over one RQE set (solid for
  the full set, dashed for the subset tight SLAs keep).
- fig_planning_time adds AutoSketch's charged benchmark time (lower bound
  and 60 s per probe), as #777 section 7 counts it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FhcWJExZcmVqS6r6rEtjis
AutoSketch-Adapted's ingest cost is window / slide overlapping sketches per
deployment (window = the query's lookback), so the column explains its gap
to ASAP. The synthetic and trace scripts both wrote summary.md into one
results directory; the synthetic one is now summary_synthetic.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FhcWJExZcmVqS6r6rEtjis
Raqe now has topk_k. The tables name it only in the query id (topk32_...),
so the runner reads it there and stops on a top-k query that names none.
On the p95 synthetic and trace tables every top-k query is k = 32, and the
plans are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FhcWJExZcmVqS6r6rEtjis
Runs on clnode155 over the asap_sketchlib 0.3.0 study (#174, #178–#186):
four synthetic workloads and alibaba_v2022 / google_2011, raw JSON,
summaries and figures. The README gives the no-SLA headline, including
Σ window/slide behind AutoSketch-Adapted's gap. profiling-time.json is
refilled from the study's raw records (0.77 h; the K = 1e4 column refill
of #186 is its own run).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FhcWJExZcmVqS6r6rEtjis
Cost figures label every bar and point with its value; the summaries and
the results README list each method's objective instead of its ratio to
ASAP. The by-dimension figure's legend moves above the panels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FhcWJExZcmVqS6r6rEtjis
Shared replicas on one metric stop adding RQEs past r = 8 (52 at r = 8,
57 at r = 64), so the grid keeps shared r ∈ {1, 8} and adds metrics
m ∈ {1, 8, 16}: copy i of the template set reads its own metric data_i,
so nothing is shared across copies and RQEs grow as 21 · m (168, 336).
The planning-time figure plots this dimension. The m = 8 and 16 runs are
added; the r = 64 result is removed. Existing tables are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FhcWJExZcmVqS6r6rEtjis
Synthetic tables name the metric each RQE reads (data, or data_i in the
metrics dimension), and AutoSketch-Adapted's benchmark time counts a
probed config once per metric, on that metric's data: 540, 4320 and
8640 s (60 s per probe) for m = 1, 8, 16. Trace tables name none and
read one metric per dataset, as before. All five synthetic workloads are
rerun with the current runner on four nodes; objectives are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FhcWJExZcmVqS6r6rEtjis
One column per workload (five synthetic, two traces), one row per weight
setting, one line per method across the SLA grid, each point labeled with
its cost. Total latency is the sum of the RQEs' estimated latencies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FhcWJExZcmVqS6r6rEtjis
…none

Checks whether AutoSketch-Adapted's memory objective makes it miss an
SLA: it never does. Its plans never merge, so each RQE's latency is within
1.4% of the lowest any deployment reaches (equal for quantile, exact and
trace RQEs), and RQEs no method can meet are excluded for all methods.
All workloads rerun on four nodes; figures and summaries regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FhcWJExZcmVqS6r6rEtjis
…6h/24h windows

- The runner lists AutoSketch-Adapted's distinct probed (metric, config)
  pairs with the data shape each is benchmarked on, and drops the
  benchmark-time lower bound. scripts/autosketch_benchmark_time.py runs
  each probe's approxbench accuracy benchmark (1e8 items, exact baseline
  and scoring) and times it, as AutoSketch benchmarks probed configs.
- Trace streams with more keys than samples per second are left out and
  listed (rounding their rate up to their key count inflated every
  method's cost).
- The trace table is regenerated from ASAPQuery #812's skew summary
  (6h and 24h windows, a day of Alibaba).
- Plots: one line per method over the full RQE set; AutoSketch's planning
  time with its measured benchmark.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FhcWJExZcmVqS6r6rEtjis
…et by default

- The runner prices every plan by use (usage::usage_cost): w_cpu * AUC(CPU)
  + w_mem * AUC(memory), CPU elastic, latency the longest chain, reported.
- ASAP is milp::minimize_usage_cost over every RQE; PerQuery the same over
  each RQE's own candidates (separate copies via `allowed`, no sharing);
  AutoSketch's plan is priced the same way.
- No SLA grid. Each method's cost-latency frontier: ASAP and PerQuery are
  solved unbounded and for 12 bounds log-spaced from the tightest feasible
  one to the unbounded latency, plus AutoSketch's latency.
- The synthetic grid is the mixed template set: shared r in {1, 8} and
  metrics m in {1, 8, 16} (50, 92, 400, 800 RQEs).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FhcWJExZcmVqS6r6rEtjis
…measured benchmark

- Four workloads of the mixed template set (50, 92 with r = 8, 400 with
  m = 8, 800 with m = 16 RQEs), cost by use (#188), each method's cheapest
  plan and ASAP's and PerQuery's cost-latency frontiers (12 bounds plus
  AutoSketch's latency), CPU-only and Fargate weights, --runs 3, one node
  per workload. No RQE dropped, no sanity violation.
- AutoSketch's benchmark time is measured: approxbench's accuracy run (1e8
  items, exact baseline, scoring) once per distinct probed config and
  shape, serially on idle clnode155 (21-37 s each), charged once per
  probed (metric, config): 212, 1697 and 3394 s for m = 1, 8, 16.
- plot_autosketch_vs_asap_synthetic.py: fig_frontier.png (cost vs. query
  latency, every point labeled), fig_planning_time.png (AutoSketch as
  search + measured benchmark; 60 s per probe only as a labeled
  reference), summary_synthetic.md. The SLA-era figures, the dashboard
  results and plot_autosketch_vs_asap_workloads.py are removed.
- README: the cost model, version 1, how to reproduce, and the headline
  numbers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FhcWJExZcmVqS6r6rEtjis
The runner adds version 2 of the evaluation beside version 1 (no latency
constraint and the frontiers, unchanged in `results`): at each SLA of a
grid (default 100, 300, 1000, 3000, 10000 ms; --slas-ms overrides), ASAP
and PerQuery plan the cheapest plan whose batch latency (the longest
chain) is at most the SLA, via minimize_usage_cost's latency bound, which
is exact with elastic CPU. An SLA below a method's tightest feasible
bound gives an infeasible record. AutoSketch's one plan is recorded at
each SLA with meets_sla. Records go to `sla_results`, with sanity checks
that every plan meets its SLA and that ASAP costs no more than PerQuery.

Results on clnode109 (--runs 3) for the mixed set, r = 8 and m = 8, 16:
no drops, no sanity violations; the tightest feasible SLA is 92 ms, and
AutoSketch (latency 1011 ms) meets only 3000 and 10000 ms. AutoSketch's
planning time is search plus its measured benchmark
(scripts/autosketch_benchmark_time.py: approxbench accuracy runs at 1e8
items, 20-33 s each, serial and alone on the node): 197 s at m = 1,
3159 s at m = 16. scripts/plot_autosketch_vs_asap_sla.py draws
fig_cost_vs_sla.png and summary_sla.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FhcWJExZcmVqS6r6rEtjis
They came from the earlier model (per-RQE SLA over a µs grid, mean-CPU
cost); the traces are to be rerun on cost by use with both latency
versions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FhcWJExZcmVqS6r6rEtjis
- Result JSONs without per-RQE choices (`chosen`): the figures and
  summaries don't read them, and they were nearly all of the 2.9M lines;
  rerun the runner for them.
- Machine files folded into the READMEs (all Intel Xeon E5-2683 v3,
  56 cores); the synthetic run script no longer writes them.
- The SLA-era trace scripts (plot_autosketch_vs_asap.py,
  run_autosketch_vs_asap.sh) are removed; the traces are to be rerun on
  cost by use.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FhcWJExZcmVqS6r6rEtjis
The PR's results are the frontier (version 1), cost vs. SLA (version 2)
and planning time on the synthetic mixed set. The trace table goes back
to the base version (the traces are to be rerun on cost by use, with
their new table), and the ASAP profiling-time script and data, which no
figure uses, are removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FhcWJExZcmVqS6r6rEtjis
rqe-optimizer/results/autosketch-vs-asap-inputs/ holds what the figures
were computed from: the sketch-bench study on asap_sketchlib 0.3.0 (the
cost table, sketches and exact aggregations, and the accuracy curves the
runner reads as --saturation-dir) and the synthetic mixed-set tables with
plan.tsv. The READMEs point the reproduce steps at them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FhcWJExZcmVqS6r6rEtjis
rqe-optimizer/results/autosketch-vs-asap-inputs/raw/ holds the gzipped
approxbench records (920 KB) that ../saturation/ was reduced from, with a
README mapping each file to its machine, arguments, record count, run time
and output. Rerunning them is 0.77 h of machine time over 5 machines in
parallel (about 20-30 minutes of wall time).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FhcWJExZcmVqS6r6rEtjis
@zzylol
zzylol force-pushed the eval/autosketch-vs-asap branch from 615a16f to e9df93a Compare October 9, 2026 18:18
@zzylol
zzylol merged commit 4214545 into main Oct 9, 2026
2 of 4 checks passed
zzylol added a commit that referenced this pull request Oct 11, 2026
The eval's inputs README lists the saturation study's accuracy grid
(out_grid_1e7_cost) and targeted 1e9 points (out_1e9), but .gitignore's
*.csv kept their six CSVs out of #138, so the eval couldn't be rerun
from the repo. Add a narrow exception for that directory and commit
them (about 1 MB): the curves the committed results were planned with.


Claude-Session: https://claude.ai/code/session_01FhcWJExZcmVqS6r6rEtjis

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants