Fix DiffEqBayesLotkaVolterra: merge split imports, fix sample_kwargs type, switch to @elapsed#1554
Open
ArpanC6 wants to merge 2 commits into
Open
Fix DiffEqBayesLotkaVolterra: merge split imports, fix sample_kwargs type, switch to @elapsed#1554ArpanC6 wants to merge 2 commits into
ArpanC6 wants to merge 2 commits into
Conversation
ArpanC6
force-pushed
the
fix/lotka-volterra-cleanup
branch
from
May 13, 2026 03:57
73969fb to
ff208a0
Compare
ArpanC6
force-pushed
the
fix/lotka-volterra-cleanup
branch
from
May 13, 2026 03:58
ff208a0 to
4bc9929
Compare
Author
|
While fixing these issues I also realized that using |
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.
What Changed
Fixed three issues in benchmarks/BayesianInference/DiffEqBayesLotkaVolterra.jmd that were exactly the same as the ones we fixed in #1552 for Lorenz and FitzHugh-Nagumo.
Why
While working on #1552, I noticed that DiffEqBayesLotkaVolterra.jmd had the same problems that we already cleaned up in the other two files. So I went ahead and fixed them here too
Split using blocks The imports were unnecessarily split into two separate Julia code cells. Merged them into one for better readability.
@time vs @Btime The Stan inference was using @time while Turing and DynamicHMC used @Btime. Made it consistent by switching to @Elapsed (since Stan’s warmup is part of the total runtime and we don’t want to exclude it). Added a small comment explaining the choice.
sample_kwargs as Dict Was passing a Dict instead of a NamedTuple. Changed it to (delta = 0.85, num_samples = 10_000) to follow Julia conventions and stay consistent with the rest of the codebase.
How
Combined the two using blocks into one
Replaced @time with @Elapsed (and stored the result)
Changed the Dict to a NamedTuple for sample_kwargs
This PR basically brings DiffEqBayesLotkaVolterra.jmd in line with the improvements already made in #1552.