TuringLang / TuringLang/AbstractMCMC.jl
Error when using MCMCEnsemble on models containing Module types
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 108
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
Originally detected in https://github.com/HighDimensionalEconLab/HMCExamples.jl/issues/28.
Essentially, we generate a Module and use that as a pseudo-function struct, but its inclusion in the model means that the model deepcopy
fails as Module cannot be deepcopied. Unfortunately it's a little tricky to detect this kind of weird case in advance. Perhaps it would be nice to add keywords disabling any of the deepcopy calls for users who don't mind so much?
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 at src/sample.jl around line 305 and reproduce the failure with MCMCEnsemble on a model containing a Module, using the linked HMCExamples.jl issue for context. Trace which deepcopy call fails and determine the expected behavior for models that cannot be deepcopied; the issue is done when that behavior is defined and covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- backend-api-design
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100