feat: select UnivMon ERP evidence by readout units - #619
Merged
Merged
Conversation
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.
Why
UnivMon supports several readouts, but a single generic error metric cannot safely size them. The backend also rejected measured non-count evidence when the default theoretical accuracy model had no guarantee.
What
Select ERP parameters and validate accuracy using readout-specific evidence: relative distinct error, relative frequency-L2 error, and absolute entropy error in bits. Preserve unknown failure probability and theoretical/exact fallback when evidence is missing.
How
A typed internal readout mapping connects Planner
AggIntentsizing andSketchQueryaccuracy validation to the same artifact metric. The runtime implementation and parameter checks remain admission requirements. The process test measures actual UnivMon accumulators, invokes normal Planner selection, installs its plan, ingests held-out data, and executes warm queries.Before this PR
UnivMon non-count readouts could not use measured ERP evidence. Treating one epsilon as a generic sketch guarantee would also admit inaccurate readouts.
After this PR
For one measured fixture, Planner selects HLL for distinct, a small UnivMon for L2, and a larger UnivMon for entropy. The small configuration's measured L2 relative error is 0.01793, while its entropy error is 0.54584 bits, so the latter uses the larger configuration. Removing only entropy evidence preserves L2 execution and causes entropy to fall back.
Verification
/mydata/erp-production-study/univmon-readout/. Reproduction and limits are documented indocs/developer_docs/univmon-erp-process-validation.md.HLL cardinality now consumes the same explicit measured relative-cardinality metric. Its theoretical relative standard error is not substituted for an empirical maximum; the new regression preserves unknown failure probability. Larger disjoint-population calibration and performance work is isolated in #626.
Limitations
Stacked on #617. This fixture measures observed errors and serialized state size; it does not establish calibrated tail probability, resident-memory usage, latency, or cost reduction. CPU is not measured or used as the fixture objective. Different selected configurations do not demonstrate shared state in this run. Production population-completeness and terminal-state validation remain tracked in the dependency work.