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

Implement global MeanField and BetheFactorization constraints #172

Merged
merged 3 commits into from
Mar 13, 2024

Conversation

wouterwln
Copy link
Member

No description provided.

@wouterwln wouterwln requested a review from bvdmitri March 13, 2024 12:42
@bvdmitri
Copy link
Member

Great! Could you please also copy the new docstrings for MeanField and BetheFactorization from ReactiveMP (the one from @Raphael-Tresor)?

@@ -775,6 +776,8 @@ function convert_to_bitsets(model::Model, node::NodeLabel, neighbors, constraint
return result
end

apply_constraints!(model::Model, context::Context, constraints) = apply_constraints!(model, context, constraints, ConstraintStack())
Copy link
Member

Choose a reason for hiding this comment

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

I think its only valid for constraints::Constraints, right?
Also we could add

function apply_constraints!(
    model::Model,
    context::Context,
    constraint::UnspecifiedConstraints
)
    nothing 
end

or even remove UnspecifiedConstraints in the favour of BetheFactorization?

Copy link
Member Author

Choose a reason for hiding this comment

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

I feel that UnspecifiedConstraints should still use the default_constraints, if any are specified, whereas BetheFactorization overrides these constraints in favour of the Bethe Factorization

Copy link

codecov bot commented Mar 13, 2024

Codecov Report

Attention: Patch coverage is 85.71429% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 91.69%. Comparing base (e199e5b) to head (569b2ec).
Report is 26 commits behind head on dev-4.0.0.

Files Patch % Lines
...onal_constraints/variational_constraints_engine.jl 81.81% 2 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##           dev-4.0.0     #172      +/-   ##
=============================================
+ Coverage      91.34%   91.69%   +0.35%     
=============================================
  Files             14       14              
  Lines           1733     1795      +62     
=============================================
+ Hits            1583     1646      +63     
+ Misses           150      149       -1     

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

@bvdmitri bvdmitri merged commit c56c324 into dev-4.0.0 Mar 13, 2024
6 of 7 checks passed
@wouterwln wouterwln deleted the allow-meanfield-bethe-as-global-constraints branch March 19, 2024 10:44
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