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

add linearizedproductof to lowprioritycandidates for sample list form constraint #341

Merged
merged 2 commits into from
Aug 1, 2024

Conversation

wouterwln
Copy link
Member

See #340 for an explanation for this PR

@bvdmitri
Copy link
Member

bvdmitri commented Aug 1, 2024

Perhaps this PR can also add ProductOf to the list?

@wouterwln
Copy link
Member Author

ProductOf is covered by :

function ReactiveMP.constrain_form(constraint::SampleListFormConstraint, product::ProductOf)
left = ReactiveMP.constrain_form(constraint, BayesBase.getleft(product))
right = ReactiveMP.constrain_form(constraint, BayesBase.getright(product))
return __approximate(constraint, left, right)
end

We can add it to the list if you want, but I don't think it will ever be called.

@bvdmitri
Copy link
Member

bvdmitri commented Aug 1, 2024

I also wonder why this error message hasn't been showed in the #340 , perhaps the logic can be improved to guide users towards LeftProposal/RightProposal

@bvdmitri
Copy link
Member

bvdmitri commented Aug 1, 2024

ProductOf is covered by

Here it isn’t, because you can have a ProductOf{T, ProductOf{A,B}} in the same way as ProductOf{T,LinearizedProductOf{A}}

@wouterwln
Copy link
Member Author

wouterwln commented Aug 1, 2024

But it will be covered since that function is recursive

Copy link
Member

@bvdmitri bvdmitri left a comment

Choose a reason for hiding this comment

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

In any case, the PR is good, can be merged as is, my comments are more about further potential improvements

@bvdmitri
Copy link
Member

bvdmitri commented Aug 1, 2024

But it will be covered since that function is recursive

ah, you are right, my bad

Copy link

codecov bot commented Aug 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.75%. Comparing base (04ea9fc) to head (44b9e49).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #341   +/-   ##
=======================================
  Coverage   84.75%   84.75%           
=======================================
  Files          19       19           
  Lines        1502     1502           
=======================================
  Hits         1273     1273           
  Misses        229      229           

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

@wouterwln wouterwln merged commit 858000c into main Aug 1, 2024
7 checks passed
@wouterwln wouterwln deleted the linearizedproductof-samplelist branch August 1, 2024 15:40
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