Skip to content
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

Support trans-dimensional bijectors, flatten MarkovBlanketCoveredModel #88

Merged
merged 18 commits into from
Sep 13, 2023

Conversation

sunxd3
Copy link
Member

@sunxd3 sunxd3 commented Sep 8, 2023

  • param_length field in Models now store a tuple of integers, which is the dimension of parameters without and with bijector transformation
    • var_lengths stores the size of values of variables, both without and with transformation. Use this information to unpack the parameter vector instead of query length at run time
  • MarkovBlanketCoveredModel stores all the fields of BUGSModel flatly
    • This allows we to reuse the evaluate!! functions now

TODOs:

  • add tests for dwish and ddrich; it's ideal to add birats to the tests too
    - [ ] add some test for using AdvancedHMC (will do this in a separate PR)

@codecov
Copy link

codecov bot commented Sep 8, 2023

Codecov Report

Patch coverage: 85.71% and project coverage change: +0.49% 🎉

Comparison is base (05b4e03) 71.75% compared to head (a01c038) 72.25%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #88      +/-   ##
==========================================
+ Coverage   71.75%   72.25%   +0.49%     
==========================================
  Files          16       16              
  Lines        1625     1629       +4     
==========================================
+ Hits         1166     1177      +11     
+ Misses        459      452       -7     
Files Changed Coverage Δ
src/BUGSPrimitives/BUGSPrimitives.jl 33.33% <ø> (ø)
src/JuliaBUGS.jl 94.87% <ø> (ø)
src/logdensityproblems.jl 53.84% <60.00%> (+53.84%) ⬆️
src/compiler_pass.jl 91.01% <84.61%> (-0.40%) ⬇️
src/model.jl 79.89% <88.37%> (+1.05%) ⬆️
src/BUGSPrimitives/distributions.jl 35.71% <100.00%> (+4.08%) ⬆️
src/graphs.jl 75.38% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sunxd3 sunxd3 marked this pull request as draft September 8, 2023 14:12
@sunxd3
Copy link
Member Author

sunxd3 commented Sep 8, 2023

@yebai Can you please give it quick look if you have some time? The PR is not fully ready yet, but the ideas are here.

Copy link
Member

@yebai yebai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good overall. It's nice that the evaluate!! function is unified for BUGS and Markov blanket models. I left some clarity comments below.

src/model.jl Show resolved Hide resolved
src/model.jl Show resolved Hide resolved
src/model.jl Outdated Show resolved Hide resolved
src/model.jl Outdated Show resolved Hide resolved
src/model.jl Outdated Show resolved Hide resolved
src/model.jl Outdated Show resolved Hide resolved
src/model.jl Outdated Show resolved Hide resolved
src/model.jl Outdated Show resolved Hide resolved
src/model.jl Outdated Show resolved Hide resolved
src/model.jl Outdated Show resolved Hide resolved
src/compiler_pass.jl Outdated Show resolved Hide resolved
src/compiler_pass.jl Outdated Show resolved Hide resolved
src/compiler_pass.jl Outdated Show resolved Hide resolved
test/logp_tests/ddirich.jl Outdated Show resolved Hide resolved
@github-actions
Copy link
Contributor

Pull Request Test Coverage Report for Build 6137549427

  • 82 of 94 (87.23%) changed or added relevant lines in 5 files are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.5%) to 72.26%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/compiler_pass.jl 11 13 84.62%
src/model.jl 63 73 86.3%
Files with Coverage Reduction New Missed Lines %
src/model.jl 3 78.84%
Totals Coverage Status
Change from base Build 6118535125: 0.5%
Covered Lines: 1167
Relevant Lines: 1615

💛 - Coveralls

src/model.jl Outdated Show resolved Hide resolved
@sunxd3
Copy link
Member Author

sunxd3 commented Sep 13, 2023

@yebai another look?

@yebai yebai marked this pull request as ready for review September 13, 2023 10:18
@yebai yebai merged commit be7cea6 into master Sep 13, 2023
13 checks passed
@yebai yebai deleted the sunxd/support-trans-dim-bijector branch September 13, 2023 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants