Skip to content

Conversation

joaquimg
Copy link
Member

@joaquimg joaquimg commented Oct 5, 2025

If there is a follow-up to jump-dev/MathOptInterface.jl#2863 removing the test we can remove this.
At the same time its does not seem bad to block Zeros bridge from start

Copy link

codecov bot commented Oct 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.08%. Comparing base (5f5f85f) to head (ef272b8).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #317      +/-   ##
==========================================
+ Coverage   89.07%   89.08%   +0.01%     
==========================================
  Files          16       16              
  Lines        2077     2079       +2     
==========================================
+ Hits         1850     1852       +2     
  Misses        227      227              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

# removed because of the `ZerosBridge` issue:
# https://github.com/jump-dev/MathOptInterface.jl/issues/2861
# - zeros bridge does not support duals because it cumbersome
# - many bridges do not support get ConstraintFunction because it is cumbersome
Copy link
Member

Choose a reason for hiding this comment

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

Why would we need ConstraintFunction ? I don't understand this one

Copy link
Member

Choose a reason for hiding this comment

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

This is something needed by the tests but in practice, no one asks for ConstraintFunction to the bridges outside of the tests. It's not clear in your comment if DiffOpt needs to query ConstraintFunction or not

Copy link
Member Author

Choose a reason for hiding this comment

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

DiffOpt needs a solver that supports ConstraintFuncion because it will copy those constraints from the optimizer to the .diff model

if !isnothing(with_bridge_type)
# removed because of the `ZerosBridge` issue:
# https://github.com/jump-dev/MathOptInterface.jl/issues/2861
# - zeros bridge does not support duals because it cumbersome
Copy link
Member

Choose a reason for hiding this comment

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

cumbersome ? Shouldn't we simply say that ZerosBridge does not support dual and we know with DiffOpt that we will need the duals so we can't use that bridge ?

Copy link
Member

Choose a reason for hiding this comment

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

This bridge is only useful in situations where we don't need the dual so in case we are sure in advance that we need the dual it's clear we can remove it

Copy link
Member

Choose a reason for hiding this comment

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

We can just say that in DiffOpt we know we want the duals so the case is clear

Copy link
Member Author

Choose a reason for hiding this comment

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

One issue is, if the bridge is there, we allow the user to pass some constraints but then we disallow duals for those.
An MOI test fails and it is conceivable that someone hits this wall.
One idea is to not add that constraint, hence the removal of the bridge.

Copy link
Member Author

Choose a reason for hiding this comment

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

I will change the comment

Copy link
Member

Choose a reason for hiding this comment

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

Makes sense, then it matches what I said, we should just say that this bridge is enabled by default and MOI expects the user to remove if it is known in advance that duals will be needed. Since we know we want duals here, we know we can remove it in advance.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants