Tractables / ProbabilisticCircuits.jl

Probabilistic Circuits from the Juice library
https://tractables.github.io/ProbabilisticCircuits.jl/dev
Apache License 2.0
104 stars 11 forks source link

Add support for `.spn` file format #91

Closed guyvdbroeck closed 3 years ago

guyvdbroeck commented 3 years ago

This is the SPN file format derived from Libra's AC file format.

guyvdbroeck commented 3 years ago

Tests on my machine are passing: I am not sure why CI has them failing?

khosravipasha commented 3 years ago

I ran the individual CI test and says:

25l25hTest loaded clt file: Error During Test at /home/runner/work/ProbabilisticCircuits.jl/ProbabilisticCircuits.jl/test/io/clt_io_test.jl:7
  Got exception outside of a @test
  UndefVarError: print_tree not defined
  Stacktrace:
   [1] macro expansion at /home/runner/.julia/packages/Suppressor/nTjgZ/src/Suppressor.jl:66 [inlined]
   [2] (::var"#2#5"{MetaGraphs.MetaDiGraph{Int32,Float64}})() at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Test/src/Test.jl:637
   [3] redirect_stderr(::var"#2#5"{MetaGraphs.MetaDiGraph{Int32,Float64}}, ::IOStream) at ./stream.jl:1150
   [4] #1 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Test/src/Test.jl:636 [inlined]
   [5] open(::var"#1#4"{MetaGraphs.MetaDiGraph{Int32,Float64}}, ::String, ::Vararg{String,N} where N; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at ./io.jl:325
   [6] open(::Function, ::String, ::String) at ./io.jl:323
   [7] top-level scope at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Test/src/Test.jl:635
   [8] top-level scope at /home/runner/work/ProbabilisticCircuits.jl/ProbabilisticCircuits.jl/test/io/clt_io_test.jl:11
   [9] top-level scope at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Test/src/Test.jl:1119
   [10] top-level scope at /home/runner/work/ProbabilisticCircuits.jl/ProbabilisticCircuits.jl/test/io/clt_io_test.jl:9
   [11] include(::Function, ::Module, ::String) at ./Base.jl:380
   [12] include(::Module, ::String) at ./Base.jl:368
   [13] exec_options(::Base.JLOptions) at ./client.jl:296
   [14] _start() at ./client.jl:506

Can see results here: https://github.com/Juice-jl/ProbabilisticCircuits.jl/runs/3812397308?check_suite_focus=true

khosravipasha commented 3 years ago

Seems unrelated to the PR though, same test failing on master branch.

codecov[bot] commented 3 years ago

Codecov Report

Merging #91 (8d20961) into master (7a02b26) will increase coverage by 0.29%. The diff coverage is 83.67%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #91      +/-   ##
==========================================
+ Coverage   70.02%   70.31%   +0.29%     
==========================================
  Files          37       38       +1     
  Lines        2802     2850      +48     
==========================================
+ Hits         1962     2004      +42     
- Misses        840      846       +6     
Impacted Files Coverage Δ
src/ProbabilisticCircuits.jl 100.00% <ø> (ø)
src/io/ensemble_io.jl 0.00% <ø> (ø)
src/io/plot.jl 0.00% <0.00%> (ø)
src/io/spn_io.jl 84.78% <84.78%> (ø)
src/io/io.jl 90.00% <100.00%> (+1.11%) :arrow_up:
src/Utils/misc.jl 40.78% <0.00%> (+1.31%) :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 3fdcc51...8d20961. Read the comment docs.

khosravipasha commented 3 years ago

Only Aqua tests fail now/