Skip to content

[MRG] Return marginals for sparse and lazy transport results - #906

Open
AryanRG wants to merge 1 commit into
PythonOT:masterfrom
AryanRG:fix-sparse-lazy-result-marginals
Open

AryanRG wants to merge 1 commit into
PythonOT:masterfrom
AryanRG:fix-sparse-lazy-result-marginals

Conversation

@AryanRG

@AryanRG AryanRG commented Oct 30, 2026 •

Copy link
Copy Markdown

Types of changes

Bug fix.

Motivation and context / Related issue

OTResult returns None for marginals that are available from a sparse plan, including results from the exact lazy solver. The combined marginals accessor also ignores lazy plans.

This returns the available marginals without materializing a full sparse plan. It preserves dtype, device and PyTorch gradients, including CSR inputs.

How has this been tested (if it applies)

CPU NumPy/PyTorch regressions and the surrounding utility/solver suite pass. Source doctests, configured lint hooks, changed documentation rendering, and built-wheel byte/import checks also pass. The full suite, documentation gallery, GPU and other backends were not run.

PR checklist

  • I have read the CONTRIBUTING document.
  • The documentation is up-to-date with the changes I made (check build artifacts).
  • All tests passed, and additional code has been covered with new tests.
  • I have added the PR and Issue fix to the RELEASES.md file.

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant