Skip to content

Make gauge fixing stable for tied magnitudes - #334

Open
kshyatt wants to merge 3 commits into
mainfrom
ksh/gauge_ties
Open

kshyatt wants to merge 3 commits into
mainfrom
ksh/gauge_ties

Conversation

@kshyatt

@kshyatt kshyatt commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

Right now, we can end up picking gauge indices based on argmax, which is really vulnerable to splitting effectively equal values based on differences of like 10^-17. Modified this to use a tolerance to avoid being so vulnerable to minute floating point differences.

@kshyatt
kshyatt requested review from Jutho and lkdvos November 26, 2026 12:20
Comment thread src/common/gauge.jl Resolved
@codecov

codecov Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/common/gauge.jl 95.16% <100.00%> (-3.15%) ⬇️
src/pushforwards/eig.jl 94.11% <100.00%> (ø)
src/pushforwards/eigh.jl 100.00% <100.00%> (ø)
src/pushforwards/svd.jl 85.96% <100.00%> (ø)

... and 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread src/common/gauge.jl Resolved
Co-authored-by: Jutho <Jutho@users.noreply.github.com>

@lkdvos lkdvos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to go ahead and merge without my approval, just wanted to chime in that it seems a bit artificial to change the gauge just because some AD tests otherwise complain, and the extra tolerance is somewhat annoying to set values for. In general, my understanding was that a global smooth gauge is impossible, so no matter what we do there will be jumps somewhere (also in this implementation when the value crosses the threshold), so code that depends on this will still spuriously fail. I understand that this might be less common with the new implementation, but it still feels a bit hacky to work around that by altering the gauging strategy.

Note though that I am definitely sympathetic to just having this fixed, if this doesn't end up costing much more and this is the faster solution, probably it is the better approach, but in a perfect world the AD tests would be robust against this

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants