Implement bridge_cost for CachingOptimizer#3001
Conversation
odow
left a comment
There was a problem hiding this comment.
Missing a test when the CachingOptimizer has NO_OPTIMIZER.
I'll run solver-tests:
https://github.com/jump-dev/MathOptInterface.jl/actions/runs/25891420946
|
This breaks a lot of packages |
|
Looking at the breaking, some are already failing: https://github.com/jump-dev/MathOptInterface.jl/actions/runs/25967424335
We should release patch version of these packages before releasing this but then it should be fine. It might break MOI layers we are not testing with solver-tests though :/ |
Abstract description
Consider layers:
LazyBridgeOptimizer(Dualization(LazyBridgeOptimizer))(with possible caching layers in between).If you have a set
Sthat does not implementdual_setbut that has bridges, then a constraintF-in-Swith this set are not supported by the dualization layer so it will be bridged by the outer layer. Now, all the other constraints that ##are supported by dualization will just go through the dualization layer will bridging cost of 0, even though they may be bridged by the inner bridges. Because of this, the bridge choice forF-in-Swill be completely blind and might be sub-optimal.Concrete example
The whole idea detailed in jump-dev/SumOfSquares.jl#205 explains that we have a
KernelBridgeand anImageBridgeand the right one will be picked thanks to the bridge costWritten by Claude,
I haven't checked yet. I have now iterated, looks good.