feat(planner): cost candidates per (sketch_type, params) from sketch-bench's table - #547
Draft
milindsrivastava1997 wants to merge 1 commit into
Draft
feat(planner): cost candidates per (sketch_type, params) from sketch-bench's table#547milindsrivastava1997 wants to merge 1 commit into
milindsrivastava1997 wants to merge 1 commit into
Conversation
…524) greedy_assign resolves AtomicCosts per candidate via resolve_atomic_costs (CMS/HLL/KLL from the table, exact-key; everything else keeps the flat stub, logged). Table loads at runtime from --atomic-costs. candidate-gen-dump gained the same flag to print resolved costs alongside each candidate, which is how the merge_cpu_secs anomaly (see sketch-bench PR #92) got found. Co-Authored-By: Claude Sonnet 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.
Closes #549
greedy_assign now resolves AtomicCosts per candidate instead of one flat cost applied to everything. CMS/HLL/KLL look up sketch-bench's exported table by exact (sketch, params) key; everything else (Sum, MinMax, CountMinSketchWithHeap, Hydra, ...) keeps the old flat stub, with a warn log so that's visible. Table loads at runtime via --atomic-costs (optimizer_cli, candidate-gen-dump) rather than being compiled in.
candidate-gen-dump got the same --atomic-costs flag so it prints resolved costs next to each candidate — using it against sketch-bench's real export (sketch-bench PR #92) is how we found that CMS currently loses to CountMinSketchWithHeap's stub on a Count query, because CMS's real merge_cpu_secs looks ~1000x too high next to its own insert/query numbers (same anomaly flagged in that PR's description, not yet root-caused).
Scope
This is a subset of #524, doesn't close it completely.
heap_size · avg_key_size)Not done: