Skip to content

[breaking] change DualOptimizer to not add bridges by default#209

Open
blegat wants to merge 2 commits intomasterfrom
bl/cache
Open

[breaking] change DualOptimizer to not add bridges by default#209
blegat wants to merge 2 commits intomasterfrom
bl/cache

Conversation

@blegat
Copy link
Copy Markdown
Member

@blegat blegat commented Mar 16, 2026

It's a bit counter intuitive to still add caches and bridges when the user explicitly give an instantiated model. I guess the use case is the DualizableModel but maybe we don't need this. We're using a UniversalFallback on top of it anyway so what's the use for it instead of just MOI.Utilities.Model ?

@blegat blegat marked this pull request as draft March 16, 2026 13:59
@blegat blegat force-pushed the bl/cache branch 2 times, most recently from ffd9eaf to 800dae2 Compare March 18, 2026 15:36
@blegat blegat changed the title Clean up API for create inner model [BREAKING] Clean up API for create inner model Mar 18, 2026
@blegat
Copy link
Copy Markdown
Member Author

blegat commented Mar 18, 2026

This is consistent with ParametricOptInterface which does some magic if it takes an optimizer constructor as argument but when it takes an instantiated optimizer, it does not modify it.

@joaquimg
Copy link
Copy Markdown
Member

Interesting,
Should we document this pattern in MOI docs?

@blegat
Copy link
Copy Markdown
Member Author

blegat commented Mar 19, 2026

Interesting, Should we document this pattern in MOI docs?

Yes, I think we should discuss this, and it should also go in parallel with the layer design that @odow suggested in
jump-dev/JuMP.jl#4014 (comment)
In the meantime, we can try to see if we can simplify the logic of each layer. For POI, we could improve MatrixOfConstraints to get rid of
https://github.com/jump-dev/ParametricOptInterface.jl/blob/2219828f43a81268a3c0b4bc787b1ea48a9e768f/src/ParametricOptInterface.jl#L304-L317

@odow odow changed the title [BREAKING] Clean up API for create inner model [breaking] change DualOptimizer to not add bridges by default Apr 14, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.47%. Comparing base (650fe1d) to head (274b3de).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #209   +/-   ##
=======================================
  Coverage   94.47%   94.47%           
=======================================
  Files          14       14           
  Lines         742      742           
=======================================
  Hits          701      701           
  Misses         41       41           

☔ 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.

@odow odow marked this pull request as ready for review April 14, 2026 06:30
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.

3 participants