SciML / SciML/JumpProcesses.jl
Seeding ensemble problems
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 150
- Forks
- 41
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 28
Description
I have been going through the code & documentation of JumpProcesses in order to find out how to set up reproducible (RNG seeded) ensemble runs. The following snippet yields the same output each time, as intended:
jprob::JumpProblem
eprob = EnsembleProblem(jprob)
solve(eprob, SSAStepper(), EnsembleSerial(); trajectories=10, seed=42)
If I replace EnsembleSerial by EnsembleThreads, the outputs stop being reproducible.
I am aware that JumpProblem seems to have an rng field, so one naive solution would be to use the prob_func argument to EnsembleProblem and remake the jump problem with a different seed for each trajectory. That is not directly possible since remake does not accept a seed or rng argument, so I currently recreate the JumpProblem from scratch (which is less than ideal).
There might be a solution to this online, but I haven't found anything, which seems surprising. Is there any better (intended) way of doing this?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the JumpProblem and EnsembleProblem APIs and run the supplied EnsembleSerial and EnsembleThreads solve calls with seed=42. Trace how rng and seed are handled for threaded trajectories; done means either reproducible threaded outputs through the intended interface or a documented, tested explanation of the limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100