Fix JAX backend failures in mixture pruning and vMF deterministic sampling#2061
Conversation
Agent-Logs-Url: https://github.com/FlorianPfaff/PyRecEst/sessions/a7ab077a-5d80-4057-8507-211171b6223b Co-authored-by: FlorianPfaff <6773539+FlorianPfaff@users.noreply.github.com>
Agent-Logs-Url: https://github.com/FlorianPfaff/PyRecEst/sessions/a7ab077a-5d80-4057-8507-211171b6223b Co-authored-by: FlorianPfaff <6773539+FlorianPfaff@users.noreply.github.com>
✅MegaLinter analysis: Success
Notices📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining See detailed reports in MegaLinter artifacts Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining
|
|
@copilot Fix megalinter issues |
Agent-Logs-Url: https://github.com/FlorianPfaff/PyRecEst/sessions/d82f7371-0a9a-48ab-9bb5-976e1b07febe Co-authored-by: FlorianPfaff <6773539+FlorianPfaff@users.noreply.github.com>
Head branch was pushed to by a user without write access
|
@copilot Fix megalinter issues |
Agent-Logs-Url: https://github.com/FlorianPfaff/PyRecEst/sessions/4a2e6739-b13d-4245-ade5-98a4c037c35c Co-authored-by: FlorianPfaff <6773539+FlorianPfaff@users.noreply.github.com>
Head branch was pushed to by a user without write access
Agent-Logs-Url: https://github.com/FlorianPfaff/PyRecEst/sessions/4a2e6739-b13d-4245-ade5-98a4c037c35c Co-authored-by: FlorianPfaff <6773539+FlorianPfaff@users.noreply.github.com>
Fixed in commit 5fc85f3. I resolved the remaining MegaLinter pylint failures with targeted fixes: kept only |

The JAX CI run failed on distribution tests due to NumPy-style indexing and in-place writes that are invalid for JAX arrays, plus overly tight float32 assertions in backend-agnostic tests. This PR aligns those paths with JAX semantics while preserving existing behavior.
JAX-safe zero-weight pruning in mixtures
AbstractMixturepruning to index backend arrays with backend integer arrays instead of Python lists.JAX-compatible deterministic vMF sample construction
VonMisesFisherDistribution.sample_deterministicto construct sigma-point columns functionally (concatenate/stack) instead of mutating array entries.get_rotation_matrixsetup to avoid in-place column assignment when building the QR input matrix.Stabilized float32-sensitive assertions