Skip to content

Revised Belief Propagation #26

Draft
jack-dunham wants to merge 37 commits intoITensor:mainfrom
jack-dunham:bp
Draft

Revised Belief Propagation #26
jack-dunham wants to merge 37 commits intoITensor:mainfrom
jack-dunham:bp

Conversation

@jack-dunham
Copy link
Contributor

@jack-dunham jack-dunham commented Nov 25, 2025

This PR express belief propagation in terms of the new interface based on AlgorithmsInterface.jl and the included AlgorithmsInterfaceExtensions.jl library.

Note, the tolerance for the second belief propagation test has been increased from 1.0e-14 to 1.0e-12, however this test was not passing reliable before the changes in this PR anyway.

JoeyT1994 and others added 29 commits January 6, 2026 09:55
Introduce `BeliefPropagationProblem` wrapper to hold the cache and the
error `diff` field.

Also simplifies some kwargs wrangling.
Also includes some fixes to the way `TensorNetwork` types are
constructed based on index structure.
…instead of trying to operate on existing graphs

The reason for this is:
- One only cares about the edges of the input graph
- A simple graph cannot be used as it "forgets" its edge names resulting
in recursion
- As shown with `TensorNetwork`, removing edges may not always be
defined.
This was caused by the change to the `cache` being backed by a directed
graph.
@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

Your PR no longer requires formatting changes. Thank you for your contribution!

@jack-dunham jack-dunham force-pushed the bp branch 2 times, most recently from a20ddcb to ac74a7f Compare February 11, 2026 14:44
@codecov
Copy link

codecov bot commented Feb 13, 2026

Codecov Report

❌ Patch coverage is 0% with 343 lines in your changes missing coverage. Please review.
✅ Project coverage is 0.00%. Comparing base (1e2a8fd) to head (5432fe2).

Files with missing lines Patch % Lines
src/beliefpropagation/beliefpropagationproblem.jl 0.00% 88 Missing ⚠️
...eliefpropagation/abstractbeliefpropagationcache.jl 0.00% 87 Missing ⚠️
src/beliefpropagation/beliefpropagationcache.jl 0.00% 76 Missing ⚠️
src/tensornetwork.jl 0.00% 63 Missing ⚠️
src/abstracttensornetwork.jl 0.00% 22 Missing ⚠️
...terfaceExtensions/AlgorithmsInterfaceExtensions.jl 0.00% 4 Missing ⚠️
src/LazyNamedDimsArrays/symbolicnameddimsarray.jl 0.00% 2 Missing ⚠️
src/LazyNamedDimsArrays/lazynameddimsarray.jl 0.00% 1 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (1e2a8fd) and HEAD (5432fe2). Click for more details.

HEAD has 7 uploads less than BASE
Flag BASE (1e2a8fd) HEAD (5432fe2)
6 0
docs 2 1
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #26       +/-   ##
==========================================
- Coverage   64.53%   0.00%   -64.54%     
==========================================
  Files          21      21               
  Lines         736    1010      +274     
==========================================
- Hits          475       0      -475     
- Misses        261    1010      +749     
Flag Coverage Δ
docs 0.00% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Comments