-
Notifications
You must be signed in to change notification settings - Fork 4
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
Issue 340: Simplify LatentDelay #388
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #388 +/- ##
==========================================
+ Coverage 93.23% 93.33% +0.10%
==========================================
Files 53 53
Lines 532 540 +8
==========================================
+ Hits 496 504 +8
Misses 36 36 ☔ View full report in Codecov by Sentry. |
Benchmark resultJudge resultBenchmark Report for /home/runner/work/Rt-without-renewal/Rt-without-renewalJob Properties
ResultsA ratio greater than
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfoTarget
Baseline
Target resultBenchmark Report for /home/runner/work/Rt-without-renewal/Rt-without-renewalJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Baseline resultBenchmark Report for /home/runner/work/Rt-without-renewal/Rt-without-renewalJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Runtime information
|
Benchmarks are a bit noisy (we need to look at tuning down the statistical threshold for flagging) but appears to show a clear speed up for ascertainment and latent delay methods. However, there is no apparent speed up for compiled reverse auto-diff. The ascertainment result is a bit of a poser given that we haven't changed anything related to that model here and the benchmarks aren't related: Rt-without-renewal/benchmark/bench/EpiObsModels/modifiers/ascertainment/Ascertainment.jl Line 2 in 1ba784b
Noting that I still see gradient issues in the benchmarks (but still not fixed Tova source) so this doesn't close the target issue even if it speeds things up a little. |
Thinking about it I assume the big variance in the ascertainment model is related to #357. |
@SamuelBrand1 thoughts on this? |
Urgh... I hit edit rather than quote reply... I've edited it back now and point above stands and is consistent with @seabbs views here. |
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.
Yes agree memoization or a turing side resolution to this would be preferable longer term |
This PR targets but may not close #340. It may also help with #357.
It simplifies the
LatentDelay
approach to use a dot product-based method rather than the current sparse matrix approach. It keeps the sparse matrix constructor as this may be useful in #386 (and generally changes here are temporary as #386 will likely improve this implementation substantially.I initially implemented this as a simple map but then decided to implement using the
accumulate_scan
framework as a test. That resulted in a bit more code overhead and complexity but maybe worth it for consistency. It definitely works in this setting though and confirms my belief that it will work for composable modelling in #385