-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when using MCMCEnsemble on models containing Module types #89
Comments
This is kind of a RFC, by the way -- I'm not sure if there's a better way than a keyword argument. |
This seems a very surprising and non-standard use of Maybe we do something similar to what we do in SciML (https://diffeq.sciml.ai/stable/features/ensemble/) and support to specify if a safety deepcopy of the model and sampler are called and what reduction function should be used. |
Our current solution is to override the |
I think we might as well implement the safecopy stuff just because it is good practice, but it is no longer a priority. |
Originally detected in HighDimensionalEconLab/HMCExamples.jl#28.
Essentially, we generate a
Module
and use that as a pseudo-function struct, but its inclusion in the model means that the modeldeepcopy
AbstractMCMC.jl/src/sample.jl
Line 305 in 56431bd
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?The text was updated successfully, but these errors were encountered: