-
Notifications
You must be signed in to change notification settings - Fork 10
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
JuliaBUGS support #303
base: main
Are you sure you want to change the base?
JuliaBUGS support #303
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #303 +/- ##
==========================================
+ Coverage 87.23% 87.30% +0.06%
==========================================
Files 103 107 +4
Lines 2570 2623 +53
==========================================
+ Hits 2242 2290 +48
- Misses 328 333 +5 ☔ View full report in Codecov by Sentry. |
Awesome!! Glad to hear the prior can be automatically extracted after all... |
@miguelbiron Thanks! I have also been interacting with the JuliaBUGS team. I will work on the JuliaBUGS target and push it to this PR branch. |
Hi guys, thanks for working on this. Please just let me know if anything is needed, happy to make additions on the JuliaBUGS end! |
Thank you @sunxd3! Actually I'd like your opinion on our approach to evaluating the prior. Context: this is an important requirement for PT methods. From what we understand of your code, there is no parallel in JuliaBUGS to the PriorContext construct in DynamicPPL. Therefore, there is no way of using My solution was to automatically extract a prior JuliaBUGS model from the joint model. This is achieved by pruning non-parameter nodes from the full graph. Then we use the smaller graph to build the prior model, with which we can easily get prior logpdfs. Question: do you think this is a reasonable approach? And do you think JuliaBUGS will in the future support prior logpdf computation? Edit: Actually it would be even better to have access to a |
I am not taking the contextual evaluation design for JuliaBUGS now because I felt the complexity is not worth it yet. So I just adde a function in the above PR. (at the cost of duplicated code) The interface will very likely to change, but I'll make sure to update here once the potential happen. |
Oh wow thank you so much! I'll test the new interface as soon as possible. |
Need to make initialization more stable (currently depends on global RNG); might explain this sole fail |
@serenlee I've created this new PR with a more structured approach for giving support for JuliaBUGS models. It is based on Julia extension mechanisms, which allows us to keep precompilation times manageable for most users.
Now you can still keep working on your own PRs. But once you are comfortable with the code, we should migrate it to this PR.
Also, beyond the extension boilerplate code, I added a function that can automatically produce a prior model to use as default reference. It works by manipulating the underlying graph of the target, removing nodes related to observations. I think it is 80% there but needs testing.