Draft
Conversation
Introduce `BeliefPropagationProblem` wrapper to hold the cache and the error `diff` field. Also simplifies some kwargs wrangling.
…be set from another cache
Also includes some fixes to the way `TensorNetwork` types are constructed based on index structure.
for more information, see https://pre-commit.ci
…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.
…s from an array.
This was caused by the change to the `cache` being backed by a directed graph.
…ble when constructing nested algorithms
Fix broken merge
Codecov Report❌ Patch coverage is
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
13690ea to
019e0d4
Compare
Contributor
|
Your PR requires formatting changes to meet the project's style guidelines. 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" |
019e0d4 to
3654af6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Parallel BP Draft PR