Repository navigation
Export the AutoSketch vs ASAP evaluation table from saturation curves - #136
Merged
Merged
Conversation
Adds scripts/export_autosketch_eval_table.py and the generated rqe-optimizer/data/autosketch-eval/table.json (W2: alibaba_v2022, boom, google_2011). Every config lists AutoSketch's single-sketch error at max_N and ASAP's error after merging m = 1/4/16/64 shards, with the saturation flag ASAP requires. recommend_config.py's grid rounding moves into grid_point() so both scripts share it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 5, 2026
Merged
zzylol
added a commit
that referenced
this pull request
Oct 5, 2026
Runner (examples/autosketch_vs_asap.rs) for the traces workloads of ProjectASAP/ASAPQuery#777: ASAP (joint MILP with one absolute latency SLA per sweep point), PerQuery-CostAware and AutoSketch-Adapted, scored by objectives::score and priced per EC2 family, with sanity checks. Accuracy now depends on the query's merge count m = S/x: a cost entry may carry "{metric}@m{b}" keys, eligibility reads the smallest measured b >= m, and a merge larger than every measured b is ineligible. Results for Alibaba 2022, Google 2011 and BOOM with figures and summary. The earlier example and scaling workloads are dropped (#777 §6). Rebased onto main, which now has #137, #135 and #136. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before this PR
The AutoSketch vs ASAPQuery evaluation (ProjectASAP/ASAPQuery#777, section 6) had no accuracy/cost table. The only one, the 18-row
rqe_atomic_costs.json, measures each config at a single size, with no data-shape matching, saturation or merge evidence.After this PR
scripts/export_autosketch_eval_table.pywritesrqe-optimizer/data/autosketch-eval/table.json.Workloads. There is one workload per dataset in ASAPQuery's
skew_summary.csv:Each RQE's data parameters are the worst case over the whole dataset, rounded to the grid exactly as
recommend_config.pydoes. Its grid rounding moved into a sharedgrid_point(). There is no burst variant: the whole-dataset worst cases replace AutoSketch's synthetic burst injection.Per config. Every candidate config of every family lists:
autosketch_error: the single-sketch curve atmax_N. AutoSketch never merges, so it has no saturation requirement.asap_error_by_mform = 1, 4, 16, 64. For CMS, CountSketch and DDSketch, everymreads the single-sketch value because they merge exactly. KLL and top-k read the merged curves from Measure accuracy after merging m shards #131.saturated(max_N ≥ n_sat): ASAP may only use a value when this is true.recommend_config.cost_of.Assumptions (README, and the per-RQE
assumptionsfield):groups = 1: a key query is one sketch over its group-by keys.λ = max_N / lookback.Inputs. KLL and top-k merged values come from #131 (merged into main as bd644fe, identical to the merged-accuracy head the curves came from). The raw curves (2.8 MB) are not committed; the README gives regeneration commands and input SHA-256s.
Validation
python3 scripts/test_export_autosketch_eval_table.py: 6 passed. They cover:m;m = 4, and the flagged fallback atm = 16;python3 scripts/test_recommend_config.py: 11 passed, after thegrid_pointextraction.🤖 Generated with Claude Code