Skip to content

Retry Sinkhorn on normalized cost; fix test build on main - #13

Merged
arclabs561 merged 2 commits into
mainfrom
fix/decisions-20261031b
Oct 31, 2026
Merged

arclabs561 merged 2 commits into
mainfrom
fix/decisions-20261031b

Conversation

@arclabs561

Copy link
Copy Markdown
Owner
  • Fixes the red main: proptest's prelude now re-exports rand 0.10's Rng, so rng.random() stopped resolving in the lib tests and tests/degenerate_inputs.rs. Both import rand::Rng explicitly.
  • minibatch_ot_greedy_pairing (and ot_cfm_coupling through it) returned Domain("sinkhorn coupling did not converge") on batches with a far outlier. On non-convergence it now retries once with the cost divided by its maximum, as torchcfm's normalize_cost does; a converged first attempt is unchanged. Two new tests (permutation; cheaper than identity) fail before the change.
  • sinkhorn_selective_avoids_forcing_outlier_column was hidden by the compile error and fails on the same non-convergence in minibatch_ot_selective_pairing, which has no fallback; a normalized retry there still uses the outlier column at reg = 1. It is #[ignore]d with that reason until the selective path gets its own fix.

Checks run: fmt, clippy -D warnings, tests, doc tests, burn check, the CI examples, semver-checks.

https://claude.ai/code/session_01UJZpXWPEdKXLtAA19wY4Sh

Henry Wallace added 2 commits October 31, 2026 12:57
Fixes the CI failure at afe8411: proptest's prelude now re-exports rand
0.10's Rng, so rng.random() on a rand_chacha 0.9 ChaCha8Rng no longer
resolves and the lib tests and tests/degenerate_inputs.rs fail to
compile. Import rand::Rng explicitly at both call sites.

Checks: cargo clippy --all-targets --all-features -D warnings.

Claude-Session: https://claude.ai/code/session_01UJZpXWPEdKXLtAA19wY4Sh
A single far outlier in a minibatch makes C/reg large enough that
log-domain Sinkhorn does not reach tol within max_iter, so
minibatch_ot_greedy_pairing and ot_cfm_coupling returned
Domain("sinkhorn coupling did not converge"). On non-convergence, retry
once with the cost divided by its maximum, as torchcfm's normalize_cost
does; a converged first attempt is unchanged. The comment now describes
both fallbacks.

Two tests use a 16x4 batch with one target at 1000: one checks the
result is a permutation, the other reverses the inliers and checks the
pairing costs less than identity. Both fail before this change; a
constant-cost retry reproduces identity and fails the cost test.

sinkhorn_selective_avoids_forcing_outlier_column hits the same
non-convergence in minibatch_ot_selective_pairing, which has no
fallback; a normalized retry there still uses the outlier column at
reg = 1. The test was hidden by the compile error fixed in the previous
commit; it is ignored with that reason until the selective path gets
its own fix.

Checks: cargo fmt --check, clippy -D warnings, tests, doctests, burn
check, CI examples, cargo semver-checks.

Claude-Session: https://claude.ai/code/session_01UJZpXWPEdKXLtAA19wY4Sh
@arclabs561
arclabs561 merged commit f4b3e21 into main Oct 31, 2026
2 checks passed
@arclabs561
arclabs561 deleted the fix/decisions-20261031b branch October 31, 2026 19:30
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