-
-
Notifications
You must be signed in to change notification settings - Fork 104
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
fix observed
for DEintegrator
#595
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #595 +/- ##
==========================================
+ Coverage 26.25% 30.53% +4.27%
==========================================
Files 54 54
Lines 4113 4120 +7
==========================================
+ Hits 1080 1258 +178
+ Misses 3033 2862 -171 ☔ View full report in Codecov by Sentry. |
tests added. I think this is ready to merge. |
24f251a
to
d30ca0b
Compare
I get the Without it observed expressions won't work for integrators. i.e. |
I guess the |
the correct |
good call on this. When removing it, I discovered that the |
Where is this function defined? There's no method that Also you'll need to disambiguate between |
|
lets see how CI likes this. |
Yeah but eventually something needs to implement it, because otherwise it'll fallback to the system which doesn't |
it gets implimented by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only just realized that SciMLFunction already implements this. I was waiting for the methods to be added 😅 Sorry for the delay. Could you make sure the symbolic indexing tests pass before merging?
I believe the symbolic indexing tests are passing (they run locally at least), but I'm having some trouble figuring out which of the CI runs is the related one. |
It's |
0c3a748
to
98ed2d7
Compare
Oh, I think the Optimization problem is #600 |
98ed2d7
to
9188660
Compare
rebased. Let's try this again. |
@Vaibhavdixit02 I thought the Optimization stats merging was handled? |
It is, this looks like something else iiuc. The downstream CI right? |
oh, I must've not refreshed. It's an @AayushSabharwal issue then 😅 |
Yeah this is a bad test I fixed in #584 get_obs = getu(sys_simplified, lorenz1.x + lorenz2.x)
get_obs_arr = getu(sys_simplified, [lorenz1.x + lorenz2.x, lorenz1.y + lorenz2.y]) should be get_obs = getu(prob, lorenz1.x + lorenz2.x)
get_obs_arr = getu(prob, [lorenz1.x + lorenz2.x, lorenz1.y + lorenz2.y]) |
which PR? |
Bump. This is kinda needed for MTK |
agreed. I'm unsure why this pr would have regressed inference though. |
Could you try rebasing this? |
9188660
to
3912dff
Compare
rebased. |
Downstream still failing. |
yes. I still have no idea why this PR causes us to lose inference precision. |
Changing the SymbolicIndexingInterface.is_observed(fn::AbstractSciMLFunction, sym) = has_sys(fn) ? is_observed(fn.sys, sym) : has_observed(fn) helps, but the same error occurs later on. |
Changing function SymbolicIndexingInterface.observed(fn::AbstractSciMLFunction, sym)
if has_observed(fn)
if is_time_dependent(fn)
return if hasmethod(fn.observed, Tuple{typeof(sym)})
fn.observed(sym)
else
let obs = fn.observed, sym = sym
(u, p, t) -> obs(sym, u, p, t)
end
end
else
return if hasmethod(fn.observed, Tuple{typeof(sym)})
fn.observed(sym)
else
let obs = fn.observed, sym = sym
(u, p) -> obs(sym, u, p)
end
end
end
end
error("SciMLFunction does not have observed")
end Fixes this. I'm not completely sure why. We need the |
…tion, sym) This feels deeply wrong to me.
Something feels deeply wrong to me here. Should |
that seems to have made things much worse. |
Yeah it should work. All of this is implemented in MTK, and the SDE version just isn't up to spec.
Yeah, that's weird. |
since our timezones match quite poorly, would you mind taking this over (e.g. possibly making your own branch so you can push without waiting for me?) it would be very nice to get this merged soon. |
Succeeded by #615 I can't close this PR |
This still needs a test, but it turns out both of these methods are unnecessary (since they just fall back to working on the ScimlFunction) and the
observed
implementation here is just incorrect.