Skip to content

Parallel BP#58

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

Parallel BP#58
jack-dunham wants to merge 47 commits intoITensor:mainfrom
jack-dunham:parallel-bp

Conversation

@jack-dunham
Copy link
Contributor

Parallel BP Draft PR

JoeyT1994 and others added 30 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.
@codecov
Copy link

codecov bot commented Feb 13, 2026

Codecov Report

❌ Patch coverage is 0% with 521 lines in your changes missing coverage. Please review.
✅ Project coverage is 0.00%. Comparing base (6f3521f) to head (3654af6).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/beliefpropagation/beliefpropagationproblem.jl 0.00% 90 Missing ⚠️
...eliefpropagation/abstractbeliefpropagationcache.jl 0.00% 87 Missing ⚠️
src/beliefpropagation/beliefpropagationcache.jl 0.00% 80 Missing ⚠️
...orNetworksNextDaggerExt/daggerbeliefpropagation.jl 0.00% 66 Missing ⚠️
src/tensornetwork.jl 0.00% 64 Missing ⚠️
...NextDistributedExt/distributedbeliefpropagation.jl 0.00% 45 Missing ⚠️
...istributedExt/ITensorNetworksNextDistributedExt.jl 0.00% 24 Missing ⚠️
...worksNextDaggerExt/ITensorNetworksNextDaggerExt.jl 0.00% 23 Missing ⚠️
src/abstracttensornetwork.jl 0.00% 22 Missing ⚠️
...etworksNextParallel/ITensorNetworksNextParallel.jl 0.00% 11 Missing ⚠️
... and 5 more

❗ There is a different number of reports uploaded between BASE (6f3521f) and HEAD (3654af6). Click for more details.

HEAD has 6 uploads less than BASE
Flag BASE (6f3521f) HEAD (3654af6)
6 0
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #58       +/-   ##
==========================================
- Coverage   63.58%   0.00%   -63.59%     
==========================================
  Files          21      28        +7     
  Lines         736    1188      +452     
==========================================
- Hits          468       0      -468     
- Misses        268    1188      +920     
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.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 19, 2026

Your PR requires formatting changes to meet the project's style guidelines.
Please run the ITensorFormatter to apply these changes.

Click here to view the suggested changes.
diff --git a/Project.toml b/Project.toml
index 59dea41..86e8e0f 100644
--- a/Project.toml
+++ b/Project.toml
@@ -28,12 +28,12 @@ TypeParameterAccessors = "7e5a90cf-f82e-492e-a09b-e3e26432c138"
 WrappedUnions = "325db55a-9c6c-5b90-b1a2-ec87e7a38c44"
 
 [weakdeps]
-TensorOperations = "6aa20fa7-93e2-5fca-9bc0-fbd0db3c71a2"
 Dagger = "d58978e5-989f-55fb-8d15-ea34adc7bf54"
+TensorOperations = "6aa20fa7-93e2-5fca-9bc0-fbd0db3c71a2"
 
 [extensions]
-ITensorNetworksNextTensorOperationsExt = "TensorOperations"
 ITensorNetworksNextDaggerExt = "Dagger"
+ITensorNetworksNextTensorOperationsExt = "TensorOperations"
 
 [compat]
 AbstractTrees = "0.4.5"
diff --git a/docs/Project.toml b/docs/Project.toml
index 9e273b0..5fa3869 100644
--- a/docs/Project.toml
+++ b/docs/Project.toml
@@ -3,8 +3,8 @@ Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
 ITensorNetworksNext = "302f2e75-49f0-4526-aef7-d8ba550cb06c"
 Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
 
-[sources]
-ITensorNetworksNext = {path = ".."}
+[sources.ITensorNetworksNext]
+path = ".."
 
 [compat]
 Documenter = "1"
diff --git a/examples/Project.toml b/examples/Project.toml
index bd688e9..780f959 100644
--- a/examples/Project.toml
+++ b/examples/Project.toml
@@ -1,8 +1,8 @@
 [deps]
 ITensorNetworksNext = "302f2e75-49f0-4526-aef7-d8ba550cb06c"
 
-[sources]
-ITensorNetworksNext = {path = ".."}
+[sources.ITensorNetworksNext]
+path = ".."
 
 [compat]
 ITensorNetworksNext = "0.3"
diff --git a/ext/ITensorNetworksNextDaggerExt/ITensorNetworksNextDaggerExt.jl b/ext/ITensorNetworksNextDaggerExt/ITensorNetworksNextDaggerExt.jl
index 33375c7..cd63173 100644
--- a/ext/ITensorNetworksNextDaggerExt/ITensorNetworksNextDaggerExt.jl
+++ b/ext/ITensorNetworksNextDaggerExt/ITensorNetworksNextDaggerExt.jl
@@ -4,9 +4,9 @@ import AlgorithmsInterface as AI
 import ITensorNetworksNext.AlgorithmsInterfaceExtensions as AIE
 import ITensorNetworksNext.ITensorNetworksNextParallel as ITNNP
 using Dagger
+using Dictionaries: set!
 using ITensorNetworksNext.ITensorNetworksNextParallel:
     DaggerNestedAlgorithm, DaggerState, ITensorNetworksNextParallel
-using Dictionaries: set!
 
 function ITNNP.DaggerNestedAlgorithm(f, iterable; kwargs...)
     return DaggerNestedAlgorithm(; algorithms = map(f, iterable), kwargs...)
diff --git a/src/beliefpropagation/abstractbeliefpropagationcache.jl b/src/beliefpropagation/abstractbeliefpropagationcache.jl
index a810c9a..cfb9f77 100644
--- a/src/beliefpropagation/abstractbeliefpropagationcache.jl
+++ b/src/beliefpropagation/abstractbeliefpropagationcache.jl
@@ -1,7 +1,7 @@
 using DataGraphs: AbstractDataGraph, edge_data, edge_data_type, vertex_data
 using Graphs: AbstractEdge, AbstractGraph
 using NamedGraphs.GraphsExtensions: boundary_edges
-using NamedGraphs.PartitionedGraphs: QuotientEdge, QuotientView, parent, QuotientVertex
+using NamedGraphs.PartitionedGraphs: QuotientEdge, QuotientVertex, QuotientView, parent
 
 messages(bp_cache::AbstractGraph) = edge_data(bp_cache)
 messages(bp_cache::AbstractGraph, edges) = [message(bp_cache, e) for e in edges]
diff --git a/test/Project.toml b/test/Project.toml
index 50a58c5..28dd571 100644
--- a/test/Project.toml
+++ b/test/Project.toml
@@ -19,8 +19,8 @@ TermInterface = "8ea1fca8-c5ef-4a55-8b96-4e9afe9c9a3c"
 Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
 WrappedUnions = "325db55a-9c6c-5b90-b1a2-ec87e7a38c44"
 
-[sources]
-ITensorNetworksNext = {path = ".."}
+[sources.ITensorNetworksNext]
+path = ".."
 
 [compat]
 AbstractTrees = "0.4.5"

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