Repository navigation
feat(bench): exact-delta-set row and HydraKLL in the rqe-optimizer cost export - #149
Merged
Merged
Conversation
…st export Add exact-delta-set, mirroring ASAPQuery's DeltaSetAggregatorAccumulator without churn (added set only, merge is a union), scored by a new key-set comparator. Add a HydraKLL helper with five configs to export_rqe_optimizer_costs.sh and gather every swept parameter at the top. Part of #143 (S5). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
milindsrivastava1997
marked this pull request as ready for review
October 6, 2026 17:01
…bets Fold point_exact, point_univmon and point_hydra_kll into point_spec over a shared measure(), so the cost and accuracy flags live in one place. Price hydra-kll on hydra_kll_disjoint_labels.yaml, whose label columns use separate alphabets (#74): the polars baseline scores 0 there (0.036 max rank error on hydra_columns_f64.yaml). Note that HydraKLL rows are whole-sketch and must not become candidates until #142. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An exact row that misses a group scores an infinite error, which serde_json writes as null, so atomic-costs skips the row and the table came out short without failing. Make the export script fail on any skipped row, and say so in the Presence doc comment instead of promising an infinite score. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 tasks
Merged
2 tasks done
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.
Part of #143 (S5). The export itself hasn't been run yet; it will be run after review.
Changes
exact-delta-set: mirrors ASAPQuery'sDeltaSetAggregatorAccumulator, but without churn. Only theaddedset is kept (a key per group, asVec<String>), soremovedstays empty and merging is a union. It reuses the exactMultiple<C>wrapper with an emptyPresentcell. A newkey-setcomparator (thePresenceaggregate: 1 for every key) scores it, and a missing key counts as infinitely wrong. Capability:KeySet.groups_per_instancenormalization inatomic_costs.rs.memory_usage_bytesreports onlysize_of::<KeyByLabelValues>()(24 bytes) per key.hydra_kll_disjoint_labels.yaml, using comparatorsubpop-rank-error. The new spec ishydra_columns_f64.yamlwith a separate alphabet per label column (Overlapping label-column domains alias into one Hydra cell, and the comparator scores it as sketch error #74). On the shared alphabet, even the exact polars baseline shows a max rank error of 0.036; on the disjoint spec it scores 0. These rows are whole-sketch: memory and merge cost aren't divided per group, so they must not become optimizer candidates until rqe-optimizer: support shared multi-subpopulation sketches (HydraKLL) in the cost model #142 lands, or they'd be overpriced by card(G). Accuracy is measured at this spec's group count only.measurehelper runs both passes (pointfor inline zipf data,point_specfor spec files), replacing three near-copies. Every swept parameter is now in one block at the top ofscripts/export_rqe_optimizer_costs.sh, and the expected row count goes from 18 to 24.Swept parameters
kll-percallddhydra-kllrows=3 cols=128/256/512 cell_k=200,rows=5 cols=256 cell_k=200,rows=3 cols=256 cell_k=500hllunivmon-cardinality,univmon-topkcms-heap-topk,countsketch-heap-topkexact-sum,exact-min,exact-max,exact-increase,exact-delta-setSmoke run (1 run each, through
flattenandatomic-costs)exact-delta-set:relative_error0, 0 missing groups, about 104 B per key over 9,950 groups.hydra-kll(rows=3 cols=128 cell_k=200): 3.4 MB for the whole sketch, max rank error about 0.047 on the disjoint spec (0.042 on the shared one, where label collisions were part of the error).For later sessions
rqe-optimizerdoesn't reference either new variant yet. Adding them as candidates and costing the key tracker is S4b.🤖 Generated with Claude Code