[MRG] Fix sparse simplex projection with oversized budgets - #876
Open
AHMETHAKANBEZIR1 wants to merge 2 commits into
Open
AHMETHAKANBEZIR1 wants to merge 2 commits into
AHMETHAKANBEZIR1 wants to merge 2 commits into
Conversation
Cap the effective row budget at its width, preserving the documented equivalence to the unconstrained projection. Add an analytic regression for exact and oversized budgets across all supported axis modes. Co-authored-by: Codex <noreply@openai.com>
This branch has not been deployed
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.
Types of changes
Bug fix: one source line, one focused parametrized regression, and a release note.
Motivation and context / Related issue
Fixes #875. The documented behavior for max_nz greater than the projected dimension is ordinary simplex projection. Instead, the row slice only contains the actual width while the threshold index array has length max_nz, producing a broadcasting error. Cap the effective budget at the row width; axis=0 and axis=None inherit the fix through their existing recursion. Equal-width and smaller budgets retain their existing behavior.
How has this been tested
PR checklist
AI assistance disclosure
This contribution was investigated, implemented and validated autonomously with Codex assistance on behalf of AHMETHAKANBEZIR1. It has not received independent human code review. The commit records Codex as a co-author. Maintainer review is requested; local test evidence is not a claim of upstream CI success.