Fix PointSolver padding default for backend overrides - #760
Merged
Merged
Conversation
This was referenced Sep 30, 2026
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.
Summary
When a PointSolver call overrides its constructor's backend, omitted
remove_infinitiesnow follows the effectivexp. A NumPy-constructed solver called withxp=jnpkeeps static padding under JIT; the reverse override strips rejected rows on NumPy. Explicit True/False choices are preserved.Refs #759 (cluster arc phase 1b). A companion workspace PR holds the JAX regression.
API Changes
PointSolver.solvecorrects padding-default behavior for explicit backend overrides. Constructor-default calls and explicitremove_infinitieschoices retain their behavior. No signature changes. See full details below.Test Plan
Full API Changes (for automation & release notes)
Changed Behaviour
PointSolver.solve(..., xp=jnp, remove_infinities=None)keeps padding even if constructed withuse_jax=False.PointSolver.solve(..., xp=np, remove_infinities=None)strips padding even if constructed withuse_jax=True.Migration
No change is required to callers using the documented backend-dependent default. Callers intentionally relying on the old mismatched constructor behavior should specify
remove_infinities=TrueorFalseexplicitly. Dynamic stripping with True still cannot run insidejax.jit; strip outside JIT.Heart override
Live user “I authorize” in response to the task-specific phase-1b development-only RED override request. Exact RED:
release validation FAILED (stage integrate). This grants commit/push/PR creation after passing validation; no merge or release authority. This change does not claim to repair Heart.