Skip to content

Use MOI routing for custom objective attributes - #382

Merged
blegat merged 3 commits into
masterfrom
bl/moi-objective-function-attribute
Nov 26, 2026
Merged

blegat merged 3 commits into
masterfrom
bl/moi-objective-function-attribute

Conversation

@blegat

@blegat blegat commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Replace the local ObjectiveFunctionAttribute wrapper and its bridge optimizer get/set implementations with MOI.Bridges.ObjectiveFunctionAttribute. Retain the attribute-specific bridge transformations and add a regression test for forwarding through a slack child that is itself bridged.

Merging this allows jump-dev/MathOptInterface.jl#3130 to be non-breaking.

Replace the local ObjectiveFunctionAttribute wrapper and its bridge optimizer get/set implementations with MOI.Bridges.ObjectiveFunctionAttribute. Retain the attribute-specific bridge transformations and add a regression test for forwarding through a slack child that is itself bridged.

This companion sketch is based directly on DiffOpt master and depends on the additive MOI API in bl/objective-function-attribute. Its minimum MOI compatibility must be updated once that API has a release version, before merging this migration.

Validation: test/bridges.jl passes all 26 assertions with normal compilation, including allocation checks. The trivial-QP test passes all 64 assertions through forward and reverse differentiation. JuliaFormatter 2 applied to the repository.
@codecov

codecov Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.83%. Comparing base (2a36217) to head (bf32daf).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #382      +/-   ##
==========================================
- Coverage   91.86%   91.83%   -0.04%     
==========================================
  Files          16       16              
  Lines        2717     2706      -11     
==========================================
- Hits         2496     2485      -11     
  Misses        221      221              

☔ View full report in Codecov by Harness.
📢 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.

@blegat
blegat merged commit e61bd12 into master Nov 26, 2026
6 checks passed
@blegat
blegat deleted the bl/moi-objective-function-attribute branch November 26, 2026 08:21
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.

1 participant