feat(distribution): add Benerator 'cumulated' distribution (numeric +…#142
Open
ake2l wants to merge 2 commits into
Open
feat(distribution): add Benerator 'cumulated' distribution (numeric +…#142ake2l wants to merge 2 commits into
ake2l wants to merge 2 commits into
Conversation
… source reads) Adds the 'cumulated' sampling distribution to close the largest Benerator migration gap (53 corpus uses), faithfully reproducing Benerator's CumulatedLong/DoubleGenerator (mean of 5 uniform draws -> symmetric bell, mean = midpoint). Numeric generators: - IntegerGenerator/FloatGenerator gain distribution=NumberDistribution.CUMULATED. Default path stays uniform and byte-identical; a raw string is rejected. - FloatGenerator computes the span in Decimal so the top granularity bin remains reachable. Source reads (CSV/JSON/memstore/DB): - 'cumulated' row selection on <variable>, <generate> and <nestedKey> via a single DataSourceRegistry.get_distributed_data dispatch (shuffle vs bell-weighted index, with replacement, deterministic under <setup rngSeed>). - SourceDistribution enum validated once at the statement boundary (SourceDistribution.coerce); removes the None default state and the per-model distribution validators. Shared cumulated_index sampler reused by the numeric generators and row selection. increment/step/random unchanged (sequential/uniform); unused Benerator distributions (shuffle/randomWalk/wedge/bitreverse) intentionally omitted - no corpus usage. Tests: DSL models for all source paths (CSV + sqlite DB + generate + nestedKey, bell shape + seed determinism) and Python shape/guard tests for the numeric generators.
cyclic (wrap-around) is meaningless for with-replacement sampling, which never runs out of rows. It was carried only for signature parity with the shuffle sibling. get_distributed_data keeps cyclic for the shuffle branch and simply does not pass it to the cumulated branch. pagination|None is left as-is: a legitimate 'no pagination' optional and the registry-wide convention, not a magic default alias.
|
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.

… source reads)
Adds the 'cumulated' sampling distribution to close the largest Benerator migration gap (53 corpus uses), faithfully reproducing Benerator's CumulatedLong/DoubleGenerator (mean of 5 uniform draws -> symmetric bell, mean = midpoint).
Numeric generators:
Source reads (CSV/JSON/memstore/DB):
Shared cumulated_index sampler reused by the numeric generators and row selection. increment/step/random unchanged (sequential/uniform); unused Benerator distributions (shuffle/randomWalk/wedge/bitreverse) intentionally omitted - no corpus usage.
Tests: DSL models for all source paths (CSV + sqlite DB + generate + nestedKey, bell shape + seed determinism) and Python shape/guard tests for the numeric generators.