Closed RenatoGeh closed 2 years ago
Merging #108 (0c38c29) into master (54f9eb3) will increase coverage by
0.01%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #108 +/- ##
==========================================
+ Coverage 85.49% 85.51% +0.01%
==========================================
Files 25 25
Lines 2737 2740 +3
==========================================
+ Hits 2340 2343 +3
Misses 397 397
Impacted Files | Coverage Δ | |
---|---|---|
src/transformations.jl | 96.09% <100.00%> (+0.03%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 54f9eb3...0c38c29. Read the comment docs.
Thanks for the PR. I see, this makes sense overall. I will take a closer look, but yeah having this minimal example as test would be great.
Thanks for the PR. I see, this makes sense overall. I will take a closer look, but yeah having this minimal example as test would be great.
Ok, done! Thanks :)
Hi,
Here's a fix to https://github.com/Juice-jl/ProbabilisticCircuits.jl/issues/80.
The issue was that
smooth_node
would only account for existing literal nodes. This means that, in a logic circuit like this onesmoothing with
smooth_node
won't be able to find neither literal 2 nor 4 on linebecause
lit_nodes
only covers seen literals.Here's a minimal example of this issue as covered in https://github.com/Juice-jl/ProbabilisticCircuits.jl/issues/80, but here adapted to the new API:
This gives the same error as mentioned in the original issue. Note that this only happens with the
StructLogicCircuit
version ofsmooth_node
, since the other, more general variant, already takes into account when we can't find the non-existing literal.This PR simply adds a condition that, if the literal has not yet been seen by
lit_nodes
, then create a new one.Let me know if and how you want me to add test cases.
Thanks, Renato