Repository navigation
fix: use findmin_resids for residual vectors in polyalgorithm solve - #780
Merged
ChrisRackauckas merged 2 commits intoJan 12, 2026
Merged
ChrisRackauckas merged 2 commits into
ChrisRackauckas merged 2 commits into
Conversation
…ciML#779) PR SciML#773 introduced a regression where `findmin_caches` was called with residual vectors (results of `get_fu`) instead of cache objects. This caused `MethodError: no method matching get_fu(::Vector{Float64})` because `findmin_caches` internally calls `get_fu` on each element, expecting cache objects. The fix uses `findmin_resids` directly since the `fus` tuple already contains residual vectors extracted by `get_fu` at line 386. Fixes SciML#779 Related: SciML/CurveFit.jl#76 Co-Authored-By: Claude Opus 4.5 <[email protected]>
Adds a test that exercises the polyalgorithm cache-based solve! path which was broken by PR SciML#773. The test uses init() + solve!() to ensure the code path through __generated_solve_cache! is exercised. Without the fix, this test would fail with: MethodError: no method matching get_fu(::Vector{Float64}) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Member
Author
|
Added regression test for issue #779 in The test exercises the cache-based |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
findmin_cacheswas incorrectly called with residual vectors instead of cache objectsfindmin_caches(cache.prob, fus)tofindmin_resids(cache.prob, fus)sincefusalready contains residual vectors fromget_fuRoot Cause
PR #773 correctly changed line 386 to use
get_fu(cache)instead ofcache.resid, but the subsequent call at line 391 still usedfindmin_caches:findmin_cachesinternally callsget_fuon each element, expecting cache objects. SincefuscontainsVector{Float64}residuals, this caused:Test Plan
Pkg.test()- all 136,534 tests passtest/issue_tests.jl) pass including the test for PR Fix polyalgorithm cache residual access using get_fu #773Fixes #779
Related: SciML/CurveFit.jl#76
🤖 Generated with Claude Code