Use of thread-local variables in AbstractMCMC
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- julia
- Domain
- distributed-systems
Research direction
Start by reviewing the AbstractMCMC parallel-sampling interface and the Julia threadid() guidance linked in the issue. The issue needs a maintainer decision on the supported strategy for per-task mutable likelihood data; done should be a documented, concurrency-safe approach that preserves useful parallelism.
Written by the indexing model from the issue text.
Description
I need to sample a distribution for which the calculation of the log-likelihood is particularly time consuming. To speed-up calculations, it is beneficial to pass to the likelihood mutable data that (1) partially contain pre-computed values and (2) can be modified by the log-likelihood depending on the specific set of parameters passed to each call.
It would be relatively easy to implement this on a sequential (non-parallel) execution of a sampling, since I could attach the mutable data to the object representing the distribution. Problems arise however for parallel processing: in this case I would need to have n copies of the mutable data, one for each task.
One way could be to store n-copies of the data and access them in each log-likelihood call using the threadid(), but as clarified here this is no longer correct.
Another possibility would be to use a lock, but this would cancel much of the benefits of going parallel, as the mutable data are used during all the loglikelihood computation.
- Dominant language
- Julia
- Stars
- 108
- Forks
- 20
- Avg merge
- 45m
- Merged PRs (30d)
- 2
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.
More from TuringLang/AbstractMCMC.jl
-
Difficulty 5/5 Over a week Newbie friendliness 38/100
TuringLang/AbstractMCMC.jl#216 · 2 comments · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
TuringLang/AbstractMCMC.jl#203 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
TuringLang/AbstractMCMC.jl#197 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
TuringLang/AbstractMCMC.jl#183 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
TuringLang/AbstractMCMC.jl#177 · 1 comment ·
All issues in TuringLang/AbstractMCMC.jl
Similar issues
-
tagbot-manual
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Sienna-Platform/PowerSystems.jl#1800 ·
-
enhancement good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100