Skip to content

Support Optim v2 - #69

Merged
oschulz merged 2 commits into
mainfrom
optim2-compat
Sep 4, 2026
Merged

Support Optim v2#69
oschulz merged 2 commits into
mainfrom
optim2-compat

Conversation

@oschulz

@oschulz oschulz commented Sep 4, 2026

Copy link
Copy Markdown
Member

Optim v2 takes the autodiff backend as an ADTypes.AbstractADType instead of a symbol, so autodiff=:forward now throws a MethodError (which is why #63 was red). This passes AutoForwardDiff() explicitly at both call sites, adds ADTypes and ForwardDiff as direct dependencies (NLSolversBase v8 no longer loads ForwardDiff itself), and sets Optim = "1.13, 2" — v1.13 is the first 1.x whose NLSolversBase accepts ADTypes objects (v1.12 also fails with current LineSearches for unrelated reasons).

Tests pass locally with Optim v1.13.3 and v2.2.2.

Supersedes #63.

🤖 Generated with Claude Code

Optim v2 takes the autodiff backend as an ADTypes object instead of a
symbol, so pass AutoForwardDiff() explicitly. This also works with
Optim v1.13 (NLSolversBase v7.9+), which becomes the lower bound;
ForwardDiff is added as a direct dependency because NLSolversBase v8
no longer loads it itself.

Created by generative AI.
@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.63%. Comparing base (70e20a9) to head (ab2761a).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #69   +/-   ##
=======================================
  Coverage   89.63%   89.63%           
=======================================
  Files          10       10           
  Lines         627      627           
=======================================
  Hits          562      562           
  Misses         65       65           

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

@oschulz
oschulz merged commit ab2761a into main Sep 4, 2026
11 checks passed
@oschulz
oschulz deleted the optim2-compat branch September 4, 2026 22:16
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