SimpleExplicitTauLeaping solver#513
Conversation
|
Rebase onto master |
f266a9d to
5963f3e
Compare
|
@sivasathyaseeelan can you make the correctness test more strict. Compare against I’m reading through the references to refresh my memory on how the adaptive stepping works, and will try to finish that tomorrow and give you some more feedback afterwards. |
isaacsas
left a comment
There was a problem hiding this comment.
@sivasathyaseeelan, to speed up review I suggest splitting this into separate PRs for explicit vs. implicit. Let's get explicit merged and then we can work on implicit.
@ChrisRackauckas I think there are some design decisions to be made here for getting at the individual rate functions and stochiometry vectors. So it is just a question if you want to work on that as part of these or as a followup -- I'd defer to what you want, but I don't think these should be advertised until we get that settled and have more extensive testing.
isaacsas
left a comment
There was a problem hiding this comment.
General comments:
- Please add comments citing the formulas you are using from the original paper for the leap selection.
- Please revise with an eye towards making this non-allocating during the solution timestepping, see the examples I've highlighted but keep in mind they are not all the cases of extraneous allocations.
|
@sivasathyaseeelan this PR needs to be updated for the changes I just merged to master. |
b5c55b2 to
7f21b85
Compare
|
@sivasathyaseeelan thanks for coming back to this! Let me know when you are done updating. |
|
@sivasathyaseeelan if tests pass now I'll merge. Thanks again for all your efforts on this one! Let me know if you return to the implicit one and I can review it once you feel you are done when I have a chance. |
|
@sivasathyaseeelan seems like the tau-leaping tests are stalling out on 1.10. Have you tested their locally? |
Yes I did, all tests were passing in my local machine |
|
And was that in Julia 1.10? |
|
(i.e. not 1.11 or 1.12) |
|
Let's see if restarting CI fixes it. |
|
@isaacsas I think the CI takes too much time to run, https://github.com/SciML/JumpProcesses.jl/actions/runs/21111444469/job/60710583077 here it took more than 5 hrs |
|
Right, but that seems to only be an issue in this PR from what I can see. For other PRs it is much less time. That suggests there is an issue in this PR or the tests when applied to the new code on 1.10. |
How can I fix this |
|
Fixing this requires some debugging work to see why it is occurring, which means figuring out in that test file what is taking so long on 1.10 vs. 1.11. The first step would be trying to run those tests line by line on Julia 1.10 and 1.11 to see if there is somewhere it hangs / takes forever (or use something like Claude Code to investigate the issue after explaining what is wrong). |
|
If you aren't able to investigate this I can look into it when I have some time, but probably won't be till later in the week as I am busy with teaching and meetings the next three days. |
|
Thank you @isaacsas. I don't have Claude, But I will try looking into this. If I can't able to debug I will let you know |
|
@sivasathyaseeelan seems there is a bug in the step rejection logic. See the summary below Issue: Tau-Leaping Tests Taking 5+ Hours on CIProblemThe "Tau Leaping Tests" are taking 267 minutes (4h 27m) on CI (Julia 1.10 LTS) but only ~4 seconds locally. This is causing CI failures. Root CauseThere is a bug in the negative population handling logic in if any(<(0), u_new)
# Halve tau to avoid negative populations, as per Cao et al. (2006), Section 3.3
tau /= 2
continue
endTwo Issues:
The current implementation relies on getting lucky with different Poisson samples on each retry (since tau is recomputed to the same value). In CI environments, this can cause many ineffective retries. |
|
It looks like tests are now passing, which is great! But there is still an issue with the lts tests taking 330m. I'll dig into it when I have a chance, but please feel free to keep looking at it yourself. I don't think we can merge this until we get that straightened out -- that will be too much of a drain on CI time. |
b1be447 to
1f1f6a8
Compare
@isaacsas I fixed the bug. The tests were not properly written and optimized, which was loading the system. Now Tau Leaping Tests are running below 50 sec! |
|
@sivasathyaseeelan I'm going to merge this and start a new PR to improve the tests. I know this was a long haul, thanks for your efforts on it! |
SimpleExplicitTauLeaping Plot:
Checklist
contributor guidelines, in particular the SciML Style Guide and
COLPRAC.
Additional context
Add any other context about the problem here.