Skip to content

Avoid PSI overflow for extreme finite samples - #7

Draft
Ayushdevo wants to merge 2 commits into
mainfrom
fix/psi-extreme-values
Draft

Ayushdevo wants to merge 2 commits into
mainfrom
fix/psi-extreme-values

Conversation

@Ayushdevo

@Ayushdevo Ayushdevo commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

Opposite extreme finite values can overflow histogram-bin construction and report zero drift for completely different constant samples. Scale extreme finite inputs before computing quantile and fallback bins in both the public PSI helper and pipeline implementation; a positive common scale preserves bucket comparisons.

Validation: four extreme-value checks (including equivalent rescaled inputs) and existing drift tests: 50 passed. The original public and pipeline implementations each fail their opposite-constant regression. Scoped Ruff E/F (excluding existing line-length violations) and git diff --check passed. The tested changed files match the base version of current main. Full suite not run. AI-assisted contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant