Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added: linearize! now uses DifferentiationInterface.jl #179

Open
wants to merge 39 commits into
base: main
Choose a base branch
from

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 (f1e04f6).

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.

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.

2 participants