Skip to content

[WIP] Fix quantized (F)GW solvers - #857

Open
cedricvincentcuaz wants to merge 13 commits into
PythonOT:masterfrom
cedricvincentcuaz:quantizedgw
Open

cedricvincentcuaz wants to merge 13 commits into
PythonOT:masterfrom
cedricvincentcuaz:quantizedgw

Conversation

@cedricvincentcuaz

@cedricvincentcuaz cedricvincentcuaz commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

Types of changes

Fix quantized (F)GW solvers that output mis-ordered indices in final OT plan (Issue #786 ).
Implies modifications of API, providing:

  • new parameters part1 and part2 as inputs to quantized_fused_gromov_wasserstein_partitioned. These variables were computed via get_graph_partition but formatted as a list or array-like containing the node assignments. This has been reformatted as a list of array-like, where each array contains the indices of the nodes in the partition, to avoid redundant steps in the previous implementations.

  • The construction of the transport plan in quantized_fused_gromov_wasserstein_partitioned is support by two hidden functions _build_full_transport_by_assignment (numpy, torch - mutable) and _build_full_transport_by_concatenation (other non-mutable backends) to leverage a more memory-efficient approach for mutable backends.

Motivation and context / Related issue

How has this been tested (if it applies)

  • This ordering mis-matched was missed by previous tests because marginals were systematically instantiatied as uniform ones. I alternated between random marginals and uniform ones to be able to catch potential issues.
  • Additional tests were integrated to

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.

@cedricvincentcuaz cedricvincentcuaz changed the title Quantizedgw [WIP] Fix quantized (F)GW solvers Sep 14, 2026
@codecov

codecov Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.85%. Comparing base (3073aa0) to head (213c509).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #857   +/-   ##
=======================================
  Coverage   96.85%   96.85%           
=======================================
  Files         128      128           
  Lines       26161    26161           
=======================================
  Hits        25337    25337           
  Misses        824      824           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants