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

Allow merge to work on VarInfo with different distributions #562

Merged
merged 8 commits into from
Nov 17, 2023

Conversation

torfjelde
Copy link
Member

Expected behavior of merge is that it gives precedence to the right-most argument, but currently we raise an error in the scenario where the distributions between two varinfos don't match. This shouldn't be done (and is prohibitive to making the Gibbs sampler in TuringLang/Turing.jl#2099 work).

This PR fixes this.

test/varinfo.jl Outdated Show resolved Hide resolved
test/varinfo.jl Outdated Show resolved Hide resolved
@coveralls
Copy link

coveralls commented Nov 16, 2023

Pull Request Test Coverage Report for Build 6905019250

  • 6 of 6 (100.0%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.01%) to 80.247%

Files with Coverage Reduction New Missed Lines %
src/varinfo.jl 1 86.61%
Totals Coverage Status
Change from base Build 6895060737: -0.01%
Covered Lines: 2535
Relevant Lines: 3159

💛 - Coveralls

Copy link

codecov bot commented Nov 16, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (485ebfb) 80.25% compared to head (94744df) 80.24%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #562      +/-   ##
==========================================
- Coverage   80.25%   80.24%   -0.02%     
==========================================
  Files          25       25              
  Lines        3161     3159       -2     
==========================================
- Hits         2537     2535       -2     
  Misses        624      624              

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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

Thanks @torfjelde - it looks good to me!

@torfjelde torfjelde added this pull request to the merge queue Nov 17, 2023
Merged via the queue into master with commit c9489aa Nov 17, 2023
12 of 14 checks passed
@torfjelde torfjelde deleted the torfjelde/merge-and-subset-fixes branch November 17, 2023 16:58
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.

None yet

3 participants