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

Add caching for solvers without init #382

Merged
merged 1 commit into from
Feb 21, 2024
Merged

Conversation

avik-pal
Copy link
Member

This is needed because we want to write generic code with init and solve! without having to query every solver to check if it supports caching.

Copy link

codecov bot commented Feb 20, 2024

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (bf072d2) 88.11% compared to head (e37b70a) 87.95%.

Files Patch % Lines
ext/NonlinearSolveLeastSquaresOptimExt.jl 0.00% 2 Missing ⚠️
src/abstract_types.jl 0.00% 2 Missing ⚠️
src/core/noinit.jl 81.81% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #382      +/-   ##
==========================================
- Coverage   88.11%   87.95%   -0.16%     
==========================================
  Files          45       46       +1     
  Lines        2675     2690      +15     
==========================================
+ Hits         2357     2366       +9     
- Misses        318      324       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@avik-pal
Copy link
Member Author

avik-pal commented Feb 20, 2024

I will do a little bit of type piracy for SimpleNonlinearSolve to avoid having to copy over this code there.

Also because caching interface comes into play when NonlinearSolve compatibility is needed

prob
alg
args
kwargs::Any
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this effect type inference? I don't see why this wouldn't be concrete as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is needed because cache.kwargs = merge(cache.kwargs, kwargs) can change the type in reinit

@ChrisRackauckas
Copy link
Member

I will do a little bit of type piracy for SimpleNonlinearSolve to avoid having to copy over this code there.

That seems reasonable.

@ChrisRackauckas ChrisRackauckas merged commit 5292a61 into master Feb 21, 2024
10 of 16 checks passed
@ChrisRackauckas ChrisRackauckas deleted the ap/fake_caching branch February 21, 2024 22:26
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