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

Merged
merged 5 commits into from
Jan 23, 2025

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 84.45%. Comparing base (8bf98e1) to head (1f0fd07).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2472   +/-   ##
=======================================
  Coverage   84.45%   84.45%           
=======================================
  Files          21       21           
  Lines        1570     1570           
=======================================
  Hits         1326     1326           
  Misses        244      244           

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

@coveralls
Copy link

coveralls commented Jan 20, 2025

Pull Request Test Coverage Report for Build 12928193180

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 75.831%

Totals Coverage Status
Change from base Build 12928004698: 0.0%
Covered Lines: 1186
Relevant Lines: 1564

💛 - Coveralls

@mhauru
Copy link
Member Author

mhauru commented Jan 22, 2025

I'll update the compat bound for DynamicPPL once the release is out, and add the new test that prevents regression.

@mhauru mhauru reopened this Jan 22, 2025
@mhauru mhauru marked this pull request as ready for review January 23, 2025 11:26
@mhauru mhauru requested a review from penelopeysm January 23, 2025 13:59
@mhauru mhauru merged commit ea35bb7 into master Jan 23, 2025
60 of 62 checks passed
@mhauru mhauru deleted the mhauru/gibbs-linking-fix branch January 23, 2025 14:34
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.

3 participants