Skip to content

Fix accumulated NumPy and PyTorch CI regressions - #4293

Merged
FlorianPfaff merged 15 commits into
mainfrom
fix/ci-wrapped-cauchy-stability-20260713
Jul 13, 2026
Merged

Fix accumulated NumPy and PyTorch CI regressions#4293
FlorianPfaff merged 15 commits into
mainfrom
fix/ci-wrapped-cauchy-stability-20260713

Conversation

@FlorianPfaff

@FlorianPfaff FlorianPfaff commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Summary

This PR repairs the accumulated backend regressions that left the repository's main Test workflow red. It keeps the existing strict NumPy/PyTorch/JAX matrix and fixes the implementation or regression contract behind each failure rather than weakening CI.

Root causes and fixes

NumPy and shared distribution contracts

  • Restore signed one-dimensional circular/hypertoroidal integration while retaining increasing-bound validation for dimensions greater than one.
  • Accept the generic singleton-vector mode representation in VonMisesDistribution.set_mode().
  • Replace an over-tight coordinate assertion on a deliberately coarse hyperhemispherical grid with a direct 30-degree measurement-alignment tolerance.

PyTorch backend contracts

  • Match SciPy's fftconvolve semantics for Python boolean axes while continuing to reject NumPy boolean scalar axes.
  • Accept NumPy and PyTorch zero-dimensional integer axis values in the patched flip helper.
  • Accept backend integer scalar orders in WrappedNormalDistribution.trigonometric_moment() while rejecting boolean and non-integral values.
  • Compute the quaternion rotation matrix used by SE(3) plotting directly with backend operations instead of calling the unavailable PyTorch spatial.Rotation adapter.
  • Compare wrapped-Cauchy and wrapped-Laplace conjugate moments through backend conj/allclose, avoiding NumPy conversion of PyTorch conjugate views and backend-specific tensor methods.
  • Let RTS control-sequence normalization fall back to per-entry handling when PyTorch cannot coerce a mixed [None, tensor] sequence.

Regression coverage

  • signed scalar and reversed multidimensional integration boundaries
  • circular particle-filter update with singleton-vector von Mises mode
  • coarse-grid vMF measurement alignment
  • SciPy-compatible Python boolean fftconvolve axes and rejected NumPy boolean axes
  • NumPy/PyTorch scalar and vector flip axes
  • backend scalar integer wrapped-normal moment orders
  • backend-independent SE(3) body-axis plotting
  • negative wrapped-Cauchy and wrapped-Laplace moment identities
  • per-step optional RTS control inputs

Validation

  • The diagnostic PyTorch suite before the final patch reported exactly 8 failures, 5,120 passes, and 706 skips.
  • NumPy 3.14, NumPy 3.11-3.13, and JAX 3.11-3.13 passed on the diagnostic branch after the earlier fixes.
  • The complete repository workflow matrix is running on this updated branch.

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ COPYPASTE jscpd yes no no 17.88s
✅ JSON prettier 7 0 0 0 1.08s
✅ JSON v8r 7 0 0 3.46s
✅ MARKDOWN markdownlint 68 0 0 0 1.45s
✅ MARKDOWN markdown-table-formatter 68 0 0 0 0.61s
✅ PYTHON black 1489 182 0 0 70.6s
✅ PYTHON isort 1489 327 0 0 1.94s
✅ REPOSITORY betterleaks yes no no 2.01s
✅ REPOSITORY checkov yes no no 48.79s
✅ REPOSITORY gitleaks yes no no 11.18s
✅ REPOSITORY git_diff yes no no 0.29s
✅ REPOSITORY secretlint yes no no 49.31s
✅ REPOSITORY syft yes no no 4.33s
✅ REPOSITORY trivy-sbom yes no no 4.04s
✅ REPOSITORY trufflehog yes no no 25.35s
✅ YAML prettier 11 0 0 0 0.5s
✅ YAML v8r 11 0 0 8.7s
✅ YAML yamllint 11 0 0 0.46s

Notices

📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)

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 FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@9.6.0 --custom-flavor-setup --custom-flavor-linters PYTHON_BLACK,PYTHON_ISORT,COPYPASTE_JSCPD,JSON_V8R,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_CHECKOV,REPOSITORY_GIT_DIFF,REPOSITORY_GITLEAKS,REPOSITORY_BETTERLEAKS,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

@FlorianPfaff
FlorianPfaff force-pushed the fix/ci-wrapped-cauchy-stability-20260713 branch from ac9640e to ae723fc Compare July 13, 2026 13:05
@FlorianPfaff FlorianPfaff changed the title Fix wrapped-Cauchy CI regression Restore signed one-dimensional uniform integration Jul 13, 2026
@FlorianPfaff FlorianPfaff reopened this Jul 13, 2026
@FlorianPfaff
FlorianPfaff force-pushed the fix/ci-wrapped-cauchy-stability-20260713 branch from 4b157ca to ae723fc Compare July 13, 2026 13:20
@FlorianPfaff FlorianPfaff changed the title Restore signed one-dimensional uniform integration Fix NumPy and PyTorch CI regressions Jul 13, 2026
@FlorianPfaff FlorianPfaff reopened this Jul 13, 2026
@FlorianPfaff FlorianPfaff changed the title Fix NumPy and PyTorch CI regressions Fix accumulated NumPy and PyTorch CI regressions Jul 13, 2026
@FlorianPfaff
FlorianPfaff merged commit 2cb6080 into main Jul 13, 2026
25 checks passed
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