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

Breaking: New version of SimpleWeightedGraphs v1.2 #93

Closed khosravipasha closed 3 years ago

khosravipasha commented 3 years ago

Fixing it to the older versrion for now. SimpleWeightedGraphs = "~1.1"

$ julia --project=test test/structurelearner/chow_liu_tree_tests.jl 

learn chow-liu tree tests: Error During Test at /space/pashak/.julia/dev/ProbabilisticCircuits/test/structurelearner/chow_liu_tree_tests.jl:9
  Got exception outside of a @test
  MethodError: no method matching SimpleWeightedGraphs.SimpleWeightedGraph(::SimpleGraph{Int64})
  Closest candidates are:
    SimpleWeightedGraphs.SimpleWeightedGraph() at /home/pashak/.julia/packages/SimpleWeightedGraphs/W7kue/src/simpleweightedgraph.jl:49
    SimpleWeightedGraphs.SimpleWeightedGraph(::SparseArrays.SparseMatrixCSC{U, T}) where {T<:Integer, U<:Real} at /home/pashak/.julia/packages/SimpleWeightedGraphs/W7kue/src/simpleweightedgraph.jl:26
    SimpleWeightedGraphs.SimpleWeightedGraph(::AbstractVector{T}, ::AbstractVector{T}, ::AbstractVector{U}; combine) where {T<:Integer, U<:Real} at /home/pashak/.julia/packages/SimpleWeightedGraphs/W7kue/src/simpleweightedgraph.jl:94
    ...
  Stacktrace:
   [1] learn_chow_liu_tree(train_x::DataFrame; α::Float64, clt_root::String, weight::Vector{Float64})
     @ ProbabilisticCircuits ~/.julia/packages/ProbabilisticCircuits/1xcPJ/src/structurelearner/chow_liu_tree.jl:28
   [2] macro expansion
     @ /space/pashak/.julia/dev/ProbabilisticCircuits/test/structurelearner/chow_liu_tree_tests.jl:47 [inlined]
   [3] macro expansion
     @ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Test/src/Test.jl:1151 [inlined]
   [4] top-level scope
     @ /space/pashak/.julia/dev/ProbabilisticCircuits/test/structurelearner/chow_liu_tree_tests.jl:10
   [5] include(mod::Module, _path::String)
     @ Base ./Base.jl:386
   [6] exec_options(opts::Base.JLOptions)
     @ Base ./client.jl:285
   [7] _start()
     @ Base ./client.jl:485
Test Summary:             | Pass  Error  Total
learn chow-liu tree tests |    1      1      2
ERROR: LoadError: Some tests did not pass: 1 passed, 0 failed, 1 errored, 0 broken.
simonschoelly commented 3 years ago

Yes, sorry about that, I was a bit careless with semantic version for SimpleWeightedGraphs The reason is, that development moved from LightGraphs to Graphs.jl.

I would recommend you to switch to Graphs.jl too and increase the version of SimpleWeightedGraphs to 1.2.