Skip to content

Conversation

@franckgaga
Copy link
Member

@franckgaga franckgaga commented Mar 19, 2025

Following #174, this PR integrate DifferentiationInterface.jl to linearize and linearze! functions. The constructor of NonLinModel now accepts a jacobian argument to switch the backend at linearization. Its default value is AutoForwardDiff. I will add some tests of linearization with AutoFiniteDiff.

It is no longer necessary with `DI.Constant` context.
This is "safer" like that. And it allows the user to verify what are the DI backends in a given MPC/MHE object. Also useful for the tests.
debug: temporarily fake a "filled" window for MHE gradient preparation (needed for some backend like FiniteDiff)
@codecov-commenter
Copy link

codecov-commenter commented Mar 19, 2025

Codecov Report

Attention: Patch coverage is 99.45652% with 1 line in your changes missing coverage. Please review.

Project coverage is 98.87%. Comparing base (c12d7bc) to head (9ff9fc6).

Files with missing lines Patch % Lines
src/controller/execute.jl 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #179      +/-   ##
==========================================
+ Coverage   98.85%   98.87%   +0.01%     
==========================================
  Files          25       25              
  Lines        4180     4162      -18     
==========================================
- Hits         4132     4115      -17     
+ Misses         48       47       -1     

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

@franckgaga franckgaga merged commit 179361b into main Mar 20, 2025
4 checks passed
@franckgaga franckgaga deleted the diff_interface_linearize branch March 20, 2025 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants