Closed vpuri3 closed 1 year ago
@gaurav-arya, can you take this over and write a few tests in test/test_jaches_products.jl
that utilize this functionality?
ie
change
f(y, x) = mul!(y, A, x)
f(x) = A * x
to something something like UJacobianWrapper
struct Func
u
p
t
end
function update_coefficients!(f::Fun, u, p, t)
# update u, p, t
end
function update_coefficients(f::Fun, u, p, t)
# update u, p, t
end
(f::Fun)(x) = t * p * u
Patch coverage: 62.50
% and project coverage change: +2.24
:tada:
Comparison is base (
53755d8
) 82.52% compared to head (57f4a55
) 84.76%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
thanks. can you also add these tests to vecjac
?
@vpuri3 is the CI working properly? It doesn't seem to have caught the bugs due to ArrayInterface v7, and moreover there's a ref to an object here that doesn't exist:
remove zygotejacvec
file an issue to fix ci after this pr please
@ChrisRackauckas this PR's also ready for review
@ChrisRackauckas this is ready for another review. your comment is resolved (see above). There are a few cleanup points for a separate PR (https://github.com/JuliaDiff/SparseDiffTools.jl/issues/238), but the behaviour here should now be correct, and ready for ODE.jl.
Also: while making the tests more comprehensive I found that x
and v
ended up becoming identical to each other a lot in test_jaches_products.jl
which resulted in the incorrect behaviour you caught not being picked up in tests. I fixed that, and also fixed an issue that num_hesvec!
and friends did not restore x
to its original state when mutating them, and then tightened up some unnecessarily loose tolerances that might have been in place because of this. All of this in done in c126bf8cb0, apologies for the additional diff noise: I needed these changes here in order to have comprehensive testing.
@ChrisRackauckas ping
https://github.com/SciML/OrdinaryDiffEq.jl/pull/1917