Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support Julia 1.7 #1382

Closed
dehann opened this issue Sep 9, 2021 · 8 comments · Fixed by #1438
Closed

support Julia 1.7 #1382

dehann opened this issue Sep 9, 2021 · 8 comments · Fixed by #1438

Comments

@dehann
Copy link
Member

dehann commented Sep 9, 2021

Likely issue on complex numbers and log.

@dehann dehann added this to the v0.25.1 milestone Sep 9, 2021
@dehann dehann added this to Improvements in Roadmap to V1.0 via automation Sep 9, 2021
@dehann dehann modified the milestones: v0.25.2, v0.25.3 Oct 14, 2021
@Affie
Copy link
Member

Affie commented Oct 17, 2021

I just had a quick look at the CI log and the first failure is from the log of a negative number called from KDE.
Stacktrace:

DomainError with -2.3542838229142713e306:
log will only return a complex result if called with a complex argument. Try log(Complex(x)).
Stacktrace:
  [1] throw_complex_domainerror(f::Symbol, x::Float64)
    @ Base.Math ./math.jl:33
  [2] _log(x::Float64, base::Val{:ℯ}, func::Symbol)
    @ Base.Math ./special/log.jl:304
  [3] log
    @ ./special/log.jl:269 [inlined]
  [4] _broadcast_getindex_evalf
    @ ./broadcast.jl:670 [inlined]
  [5] _broadcast_getindex
    @ ./broadcast.jl:643 [inlined]
  [6] getindex
    @ ./broadcast.jl:597 [inlined]
  [7] macro expansion
    @ ./broadcast.jl:1005 [inlined]
  [8] macro expansion
    @ ./simdloop.jl:77 [inlined]
  [9] copyto!
    @ ./broadcast.jl:1004 [inlined]
 [10] copyto!
    @ ./broadcast.jl:957 [inlined]
 [11] copy
    @ ./broadcast.jl:929 [inlined]
 [12] materialize
    @ ./broadcast.jl:904 [inlined]
 [13] evalAvgLogL(bd1::BallTreeDensity, bd2::BallTreeDensity, addop::Tuple{typeof(+)}, diffop::Tuple{typeof(-)})
    @ KernelDensityEstimate ~/.julia/dev/KernelDensityEstimate/src/DualTree01.jl:468
 [14] entropy
    @ ~/.julia/dev/KernelDensityEstimate/src/DualTree01.jl:507 [inlined]
 [15] nLOO_LL(alpha::Float64, bd::BallTreeDensity, addop::Tuple{typeof(+)}, diffop::Tuple{typeof(-)})
    @ KernelDensityEstimate ~/.julia/dev/KernelDensityEstimate/src/CrossValidation.jl:20
 [16] golden(bd::BallTreeDensity, ax::Float64, bx::Float64, cx::Float64, tol::Float64, addop::Tuple{typeof(+)}, diffop::Tuple{typeof(-)})
    @ KernelDensityEstimate ~/.julia/dev/KernelDensityEstimate/src/CrossValidation.jl:83
 [17] ksize(bd::BallTreeDensity, addop::Tuple{typeof(+)}, diffop::Tuple{typeof(-)})
    @ KernelDensityEstimate ~/.julia/dev/KernelDensityEstimate/src/CrossValidation.jl:116
 [18] kde!(points::Matrix{Float64}, addop::Tuple{typeof(+)}, diffop::Tuple{typeof(-)})
    @ KernelDensityEstimate ~/.julia/dev/KernelDensityEstimate/src/KDE01.jl:19
 [19] kde! (repeats 2 times)
    @ ~/.julia/dev/KernelDensityEstimate/src/KDE01.jl:31 [inlined]
 [20] getKDEManifoldBandwidths(pts::Matrix{Float64}, manif::Tuple{Symbol, Symbol, Symbol})
    @ ApproxManifoldProducts ~/.julia/packages/ApproxManifoldProducts/oopxJ/src/Legacy.jl:83
 [21] ManifoldKernelDensity(M::GroupManifold{ℝ, ProductManifold{ℝ, Tuple{TranslationGroup{Tuple{2}, ℝ}, SpecialOrthogonal{2}}}, Manifolds.SemidirectProductOperation{RotationAction{TranslationGroup{Tuple{2}, ℝ}, SpecialOrthogonal{2}, LeftAction}}}, vecP::Vector{ProductRepr{Tuple{Vector{Float64}, Matrix{Float64}}}}, u0::ProductRepr{Tuple{Vector{Float64}, Matrix{Float64}}}; partial::Nothing, infoPerCoord::Vector{Float64}, dims::Int64, bw::Nothing)
    @ ApproxManifoldProducts ~/.julia/packages/ApproxManifoldProducts/oopxJ/src/services/ManifoldKernelDensity.jl:64
 [22] #manikde!#37
    @ ~/.julia/packages/ApproxManifoldProducts/oopxJ/src/services/ManifoldKernelDensity.jl:81 [inlined]
 [23] approxConvBelief(dfg::LightDFG{SolverParams, DFGVariable, DFGFactor}, fc::DFGFactor{CommonConvWrapper{ManifoldPrior{GroupManifold{ℝ, ProductManifold{ℝ, Tuple{TranslationGroup{Tuple{2}, ℝ}, SpecialOrthogonal{2}}}, Manifolds.SemidirectProductOperation{RotationAction{TranslationGroup{Tuple{2}, ℝ}, SpecialOrthogonal{2}, LeftAction}}}, ZeroMeanDiagNormal{Tuple{Base.OneTo{Int64}}}, ProductRepr{Tuple{MVector{2, Float64}, MMatrix{2, 2, Float64, 4}}}, ManifoldsBase.VeeOrthogonalBasis{ℝ}}, Nothing, Vector{Int64}, NamedTuple{(:x0,), Tuple{Vector{Any}}}, Nothing, ProductRepr{Tuple{MVector{2, Float64}, MMatrix{2, 2, Float64, 4}}}}, 1}, target::Symbol, measurement::Vector{Tuple}; solveKey::Symbol, N::Int64, skipSolve::Bool)
    @ IncrementalInference ~/.julia/dev/IncrementalInference/src/services/ApproxConv.jl:26
 [24] #calcProposalBelief#320
    @ ~/.julia/dev/IncrementalInference/src/services/ApproxConv.jl:161 [inlined]
 [25] proposalbeliefs!(dfg::LightDFG{SolverParams, DFGVariable, DFGFactor}, destlbl::Symbol, factors::Vector{DFGFactor}, dens::Vector{ManifoldKernelDensity}, measurement::Vector{Tuple}; solveKey::Symbol, N::Int64, dbg::Bool)
    @ IncrementalInference ~/.julia/dev/IncrementalInference/src/services/ApproxConv.jl:229
 [26] propagateBelief(dfg::LightDFG{SolverParams, DFGVariable, DFGFactor}, destvar::DFGVariable{SpecialEuclidean2}, factors::Vector{DFGFactor}; solveKey::Symbol, dens::Vector{ManifoldKernelDensity}, N::Int64, needFreshMeasurements::Bool, dbg::Bool, logger::Base.CoreLogging.SimpleLogger)
    @ IncrementalInference ~/.julia/dev/IncrementalInference/src/GraphProductOperations.jl:30
 [27] predictbelief(dfg::LightDFG{SolverParams, DFGVariable, DFGFactor}, destvert::DFGVariable{SpecialEuclidean2}, factors::Vector{DFGFactor}; asPartial::Bool, kw::Base.Pairs{Symbol, Any, NTuple{4, Symbol}, NamedTuple{(:needFreshMeasurements, :N, :dbg, :logger), Tuple{Bool, Int64, Bool, Base.CoreLogging.SimpleLogger}}})
    @ IncrementalInference ~/.julia/dev/IncrementalInference/src/GraphProductOperations.jl:67
 [28] predictbelief(dfg::LightDFG{SolverParams, DFGVariable, DFGFactor}, destlbl::Symbol, fctlbls::Vector{Symbol}; kw::Base.Pairs{Symbol, Any, NTuple{4, Symbol}, NamedTuple{(:needFreshMeasurements, :N, :dbg, :logger), Tuple{Bool, Int64, Bool, Base.CoreLogging.SimpleLogger}}})
    @ IncrementalInference ~/.julia/dev/IncrementalInference/src/GraphProductOperations.jl:76
 [29] #predictbelief#332
    @ ~/.julia/dev/IncrementalInference/src/GraphProductOperations.jl:82 [inlined]
 [30] doFMCIteration(fgl::LightDFG{SolverParams, DFGVariable, DFGFactor}, vsym::Symbol, solveKey::Symbol, cliq::IncrementalInference.TreeClique, fmsgs::Vector{LikelihoodMessage}, N::Int64, dbg::Bool, needFreshMeasurements::Bool, logger::Base.CoreLogging.SimpleLogger)
    @ IncrementalInference ~/.julia/dev/IncrementalInference/src/SolveTree.jl:65
 [31] fmcmc!(fgl::LightDFG{SolverParams, DFGVariable, DFGFactor}, cliq::IncrementalInference.TreeClique, fmsgs::Vector{LikelihoodMessage}, lbls::Vector{Symbol}, solveKey::Symbol, N::Int64, MCMCIter::Int64, dbg::Bool, logger::Base.CoreLogging.SimpleLogger, multithreaded::Bool)
    @ IncrementalInference ~/.julia/dev/IncrementalInference/src/SolveTree.jl:116
 [32] upGibbsCliqueDensity(dfg::LightDFG{SolverParams, DFGVariable, DFGFactor}, cliq::IncrementalInference.TreeClique, solveKey::Symbol, inmsgs::Vector{LikelihoodMessage}, N::Int64, dbg::Bool, iters::Int64, logger::Base.CoreLogging.SimpleLogger)
    @ IncrementalInference ~/.julia/dev/IncrementalInference/src/SolveTree.jl:186
 [33] approxCliqMarginalUp!(csmc::CliqStateMachineContainer{BayesTreeNodeData, LightDFG{SolverParams, DFGVariable, DFGFactor}, LightDFG{SolverParams, DFGVariable, DFGFactor}, MetaBayesTree}, childmsgs::Vector{LikelihoodMessage}; N::Int64, dbg::Bool, multiproc::Bool, logger::Base.CoreLogging.SimpleLogger, iters::Int64, drawpdf::Bool)
    @ IncrementalInference ~/.julia/dev/IncrementalInference/src/CliqStateMachineUtils.jl:387
 [34] __doCliqUpSolveInitialized!(csmc::CliqStateMachineContainer{BayesTreeNodeData, LightDFG{SolverParams, DFGVariable, DFGFactor}, LightDFG{SolverParams, DFGVariable, DFGFactor}, MetaBayesTree})
    @ IncrementalInference ~/.julia/dev/IncrementalInference/src/CliqStateMachineUtils.jl:32
 [35] solveUp_StateMachine(csmc::CliqStateMachineContainer{BayesTreeNodeData, LightDFG{SolverParams, DFGVariable, DFGFactor}, LightDFG{SolverParams, DFGVariable, DFGFactor}, MetaBayesTree})
    @ IncrementalInference ~/.julia/dev/IncrementalInference/src/CliqueStateMachine.jl:367
 [36] (::StateMachine{CliqStateMachineContainer})(userdata::CliqStateMachineContainer{BayesTreeNodeData, LightDFG{SolverParams, DFGVariable, DFGFactor}, LightDFG{SolverParams, DFGVariable, DFGFactor}, MetaBayesTree}, timeout::Nothing; pollinterval::Float64, breakafter::Function, verbose::Bool, verbosefid::Base.TTY, verboseXtra::IncrementalInference.CliqStatus, iterlimit::Int64, injectDelayBefore::Nothing, recordhistory::Bool, housekeeping_cb::IncrementalInference.var"#445#447"{IncrementalInference.TreeClique, CliqStateMachineContainer{BayesTreeNodeData, LightDFG{SolverParams, DFGVariable, DFGFactor}, LightDFG{SolverParams, DFGVariable, DFGFactor}, MetaBayesTree}})
    @ FunctionalStateMachine ~/.julia/packages/FunctionalStateMachine/2JZFG/src/StateMachine.jl:82
 [37] initStartCliqStateMachine!(dfg::LightDFG{SolverParams, DFGVariable, DFGFactor}, tree::MetaBayesTree, cliq::IncrementalInference.TreeClique, timeout::Nothing; oldcliqdata::BayesTreeNodeData, verbose::Bool, verbosefid::Base.TTY, drawtree::Bool, show::Bool, incremental::Bool, limititers::Int64, upsolve::Bool, downsolve::Bool, recordhistory::Bool, delay::Bool, logger::Base.CoreLogging.SimpleLogger, solve_progressbar::Nothing, algorithm::Symbol, solveKey::Symbol)
    @ IncrementalInference ~/.julia/dev/IncrementalInference/src/CliqueStateMachine.jl:64
 [38] tryCliqStateMachineSolve!(dfg::LightDFG{SolverParams, DFGVariable, DFGFactor}, treel::MetaBayesTree, cliqKey::Int64, timeout::Nothing; oldtree::MetaBayesTree, verbose::Bool, verbosefid::Base.TTY, drawtree::Bool, limititers::Int64, downsolve::Bool, incremental::Bool, delaycliqs::Vector{Symbol}, recordcliqs::Vector{Symbol}, solve_progressbar::Nothing, algorithm::Symbol, solveKey::Symbol)
    @ IncrementalInference ~/.julia/dev/IncrementalInference/src/SolverAPI.jl:112
 [39] (::IncrementalInference.var"#496#499"{MetaBayesTree, Bool, Bool, Base.TTY, Bool, Bool, Vector{Symbol}, Vector{Symbol}, Symbol, Symbol, LightDFG{SolverParams, DFGVariable, DFGFactor}, MetaBayesTree, Nothing, Nothing, Int64, Int64})()
    @ IncrementalInference ./task.jl:411

@dehann dehann modified the milestones: v0.25.3, v0.25.4 Oct 17, 2021
@dehann dehann modified the milestones: v0.25.4, v0.25.5 Oct 19, 2021
@Affie
Copy link
Member

Affie commented Oct 21, 2021

@dehann
Copy link
Member Author

dehann commented Oct 21, 2021

xref JuliaLang/julia#42747

@Affie
Copy link
Member

Affie commented Oct 23, 2021

The issue above is now fixed in the julia nightly build. It will be included in v1.7.0/v1.7.0-RC3.

@Affie
Copy link
Member

Affie commented Oct 23, 2021

The nightly tests now shows a different upstream issue:

Test loading and saving of Bayes (Junction) tree: Error During Test at /home/runner/work/IncrementalInference.jl/IncrementalInference.jl/test/testTreeSaveLoad.jl:6
  Got exception outside of a @test
  type DataType has no field mutable
  Stacktrace:
    [1] getproperty
      @ ./Base.jl:33 [inlined]
    [2] hasfielddata(T::Any, encounteredtypes::Vector{DataType})
      @ JLD2 ~/.julia/packages/JLD2/qncOK/src/data/writing_datatypes.jl:24
    [3] hasdata(T::DataType, encounteredtypes::Vector{DataType})
      @ JLD2 ~/.julia/packages/JLD2/qncOK/src/data/writing_datatypes.jl:32
    [4] hasdata
      @ ~/.julia/packages/JLD2/qncOK/src/data/writing_datatypes.jl:30 [inlined]
    [5] odr(#unused#::Type{MetaBayesTree})
      @ JLD2 ~/.julia/packages/JLD2/qncOK/src/data/writing_datatypes.jl:563
    [6] objodr
      @ ~/.julia/packages/JLD2/qncOK/src/data/writing_datatypes.jl:109 [inlined]
    [7] write_dataset
      @ ~/.julia/packages/JLD2/qncOK/src/datasets.jl:541 [inlined]
    [8] write(g::JLD2.Group{JLD2.JLDFile{JLD2.MmapIO}}, name::String, obj::MetaBayesTree, wsession::JLD2.JLDWriteSession{Dict{UInt64, JLD2.RelOffset}})
      @ JLD2 ~/.julia/packages/JLD2/qncOK/src/groups.jl:119
    [9] write(f::JLD2.JLDFile{JLD2.MmapIO}, name::String, obj::MetaBayesTree, wsession::JLD2.JLDWriteSession{Dict{UInt64, JLD2.RelOffset}})
      @ JLD2 ~/.julia/packages/JLD2/qncOK/src/JLD2.jl:347
   [10] macro expansion
      @ ~/.julia/packages/JLD2/qncOK/src/loadsave.jl:66 [inlined]
   [11] saveTree(treel::MetaBayesTree, filepath::String)
      @ IncrementalInference ~/work/IncrementalInference.jl/IncrementalInference.jl/src/JunctionTree.jl:1636
   [12] saveTree(treel::MetaBayesTree)
      @ IncrementalInference ~/work/IncrementalInference.jl/IncrementalInference.jl/src/JunctionTree.jl:1629
   [13] macro expansion
      @ ~/work/IncrementalInference.jl/IncrementalInference.jl/test/testTreeSaveLoad.jl:12 [inlined]
   [14] macro expansion
      @ /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.8/Test/src/Test.jl:1321 [inlined]
   [15] top-level scope
      @ ~/work/IncrementalInference.jl/IncrementalInference.jl/test/testTreeSaveLoad.jl:8
   [16] include(fname::String)
      @ Base.MainInclude ./client.jl:451
   [17] top-level scope
      @ ~/work/IncrementalInference.jl/IncrementalInference.jl/test/runtests.jl:30
   [18] include(fname::String)
      @ Base.MainInclude ./client.jl:451
   [19] top-level scope
      @ none:6
   [20] eval
      @ ./boot.jl:368 [inlined]
   [21] exec_options(opts::Base.JLOptions)
      @ Base ./client.jl:271
   [22] _start()
      @ Base ./client.jl:497

@dehann
Copy link
Member Author

dehann commented Oct 23, 2021

Looks like it's the test for saveTree. How far do the tests get if you suppress just that JLD2 save/load tree test?

@Affie
Copy link
Member

Affie commented Oct 23, 2021

Lets see: #1438

@Affie
Copy link
Member

Affie commented Oct 23, 2021

Yes, It's the only issue on the nightly build.
I'm leaning towards fixing together with the change of LightGraphs (MetaGraphs) to Graphs and when the next julia rc or stable version is released.

@dehann dehann modified the milestones: v0.25.5, v0.25.6 Oct 23, 2021
@dehann dehann linked a pull request Oct 23, 2021 that will close this issue
@dehann dehann modified the milestones: v0.25.6, v0.26.0 Nov 8, 2021
@dehann dehann modified the milestones: v0.26.0, v0.0.x Nov 15, 2021
Roadmap to V1.0 automation moved this from Improvements to Completed Nov 22, 2021
@dehann dehann modified the milestones: v0.0.x, v0.26.1 Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Roadmap to V1.0
  
Completed
Development

Successfully merging a pull request may close this issue.

2 participants