Skip to content

Reuse the differentiation backend - #377

Open
joaquimg wants to merge 1 commit into
masterfrom
perf/reuse-diff-model
Open

Reuse the differentiation backend#377
joaquimg wants to merge 1 commit into
masterfrom
perf/reuse-diff-model

Conversation

@joaquimg

Copy link
Copy Markdown
Member

_diff is re-entered after every optimize! (which invalidates model.diff), and each rebuild instantiated a fresh LazyBridgeOptimizer, re-resolving a bridge graph that depends only on the problem structure.

The backend is now kept in model.diff_backend under a (constructor, parametric) key and merely MOI.empty!-ed on reuse, which clears model and bridge maps but preserves the resolved graph.

@codecov

codecov Bot commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.86%. Comparing base (5537420) to head (64b0ff7).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #377      +/-   ##
==========================================
+ Coverage   91.82%   91.86%   +0.03%     
==========================================
  Files          16       16              
  Lines        2705     2717      +12     
==========================================
+ Hits         2484     2496      +12     
  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.

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