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

Fix a Gibbs bug with models where linking changes variable dimension #2472

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mhauru
Copy link
Member

@mhauru mhauru commented Jan 20, 2025

Currently this PR only adds a test, the actual fix is to be implemented. The test reproduces the issue encountered in TuringLang/docs#579.

I think the fix is to just remove this assertion in DPPL: https://github.com/TuringLang/DynamicPPL.jl/blob/938a69dfabb7089f52700ef01fa3a9f2d667b7d1/src/varinfo.jl#L532
I don't see a reason why, when merging two VarInfos, all the variables should have the same dimension in both VIs being merged. However, due to Chesterton's fence I'm uncomfortable making that change before I've understood why the assertion is there in the first place.

@mhauru mhauru force-pushed the mhauru/gibbs-linking-fix branch from 00c46a6 to 23365a7 Compare January 20, 2025 12:18
Copy link

codecov bot commented Jan 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.96%. Comparing base (24d5556) to head (23365a7).

❗ There is a different number of reports uploaded between BASE (24d5556) and HEAD (23365a7). Click for more details.

HEAD has 7 uploads less than BASE
Flag BASE (24d5556) HEAD (23365a7)
54 47
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2472      +/-   ##
==========================================
- Coverage   85.01%   79.96%   -5.06%     
==========================================
  Files          21       21              
  Lines        1582     1582              
==========================================
- Hits         1345     1265      -80     
- Misses        237      317      +80     

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

@coveralls
Copy link

Pull Request Test Coverage Report for Build 12867839870

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 80 unchanged lines in 4 files lost coverage.
  • Overall coverage decreased (-5.1%) to 71.383%

Files with Coverage Reduction New Missed Lines %
src/mcmc/Inference.jl 3 84.62%
src/mcmc/repeat_sampler.jl 3 65.0%
src/mcmc/abstractmcmc.jl 8 78.72%
src/mcmc/gibbs.jl 66 55.24%
Totals Coverage Status
Change from base Build 12786420948: -5.1%
Covered Lines: 1125
Relevant Lines: 1576

💛 - Coveralls

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