We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Minimal example:
@gen function model() x ~ normal(0, 1) {(1, 1)} ~ normal(0, 1) end trace = simulate(model, ()) hmc(trace, selectall())
throws the following error:
MethodError: no method matching isless(::Symbol, ::Tuple{Int64, Int64}) Closest candidates are: isless(::Tuple{}, ::Tuple) at /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/base/tuple.jl:454 isless(::Tuple, ::Tuple) at /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/base/tuple.jl:462 isless(::Any, ::Missing) at /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/base/missing.jl:88 ... Stacktrace: [1] lt(o::Base.Order.ForwardOrdering, a::Symbol, b::Tuple{Int64, Int64}) @ Base.Order ./ordering.jl:109 [2] sort!(v::Vector{Any}, lo::Int64, hi::Int64, #unused#::Base.Sort.InsertionSortAlg, o::Base.Order.ForwardOrdering) @ Base.Sort ./sort.jl:507 [3] sort!(v::Vector{Any}, lo::Int64, hi::Int64, a::Base.Sort.MergeSortAlg, o::Base.Order.ForwardOrdering, t::Vector{Any}) @ Base.Sort ./sort.jl:592 [4] sort! @ ./sort.jl:591 [inlined] [5] sort! @ ./sort.jl:664 [inlined] [6] #sort!#8 @ ./sort.jl:725 [inlined] [7] sort! @ ./sort.jl:713 [inlined] [8] #sort#9 @ ./sort.jl:772 [inlined] [9] sort @ ./sort.jl:772 [inlined] [10] _fill_array!(choices::DynamicChoiceMap, arr::Vector{Float64}, start_idx::Int64) @ Gen ~/.julia/packages/Gen/Dne3u/src/choice_map.jl:799 [11] to_array(choices::DynamicChoiceMap, #unused#::Type{Float64}) @ Gen ~/.julia/packages/Gen/Dne3u/src/choice_map.jl:174 [12] hmc(trace::Gen.DynamicDSLTrace{DynamicDSLFunction{Any}}, selection::AllSelection; L::Int64, eps::Float64, check::Bool, observations::EmptyChoiceMap) @ Gen ~/.julia/packages/Gen/Dne3u/src/inference/hmc.jl:36 [13] hmc(trace::Gen.DynamicDSLTrace{DynamicDSLFunction{Any}}, selection::AllSelection) @ Gen ~/.julia/packages/Gen/Dne3u/src/inference/hmc.jl:28 [14] top-level scope @ In[1585]:7 [15] eval @ ./boot.jl:373 [inlined] [16] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String) @ Base ./loading.jl:1196
The "sort" operation in "_fill_array!" for DynamicChoiceMaps being the problem. I can think of two fixes:
Happy to make a PR once you guys have decided on the best fix!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Minimal example:
throws the following error:
The "sort" operation in "_fill_array!" for DynamicChoiceMaps being the problem. I can think of two fixes:
Happy to make a PR once you guys have decided on the best fix!
The text was updated successfully, but these errors were encountered: