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

_fill_array! not implemented for VectorTraceChoiceMap #464

Open
femtomc opened this issue Apr 18, 2022 · 0 comments · May be fixed by #465
Open

_fill_array! not implemented for VectorTraceChoiceMap #464

femtomc opened this issue Apr 18, 2022 · 0 comments · May be fixed by #465
Assignees

Comments

@femtomc
Copy link
Contributor

femtomc commented Apr 18, 2022

It seems like this might prevent usage of algorithms like hmc with some of the combinators:

MethodError: no method matching _fill_array!(::Gen.VectorTraceChoiceMap{Gen.UnfoldType, Float64, var"##StaticIRTrace_kernel_nl7b#4224"}, ::Vector{Float64}, ::Int64)
Closest candidates are:
  _fill_array!(::Vector{T}, ::Vector{T}, ::Int64) where T at /home/adam/.julia/packages/Gen/DzPIu/src/choice_map.jl:188
  _fill_array!(::StaticChoiceMap, ::Vector{T}, ::Int64) where T at /home/adam/.julia/packages/Gen/DzPIu/src/choice_map.jl:474
  _fill_array!(::DynamicChoiceMap, ::Vector{T}, ::Int64) where T at /home/adam/.julia/packages/Gen/DzPIu/src/choice_map.jl:783
  ...

Stacktrace:
 [1] _fill_array!(choices::StaticChoiceMap{(), Tuple{}, (:chain_model,), Tuple{Gen.VectorTraceChoiceMap{Gen.UnfoldType, Float64, var"##StaticIRTrace_kernel_nl7b#4224"}}}, arr::Vector{Float64}, start_idx::Int64)
   @ Gen ~/.julia/packages/Gen/DzPIu/src/choice_map.jl:481
 [2] to_array(choices::StaticChoiceMap{(), Tuple{}, (:chain_model,), Tuple{Gen.VectorTraceChoiceMap{Gen.UnfoldType, Float64, var"##StaticIRTrace_kernel_nl7b#4224"}}}, #unused#::Type{Float64})
   @ Gen ~/.julia/packages/Gen/DzPIu/src/choice_map.jl:174
 [3] hmc(trace::var"##StaticIRTrace_nl9#4344", selection::DynamicSelection; L::Int64, eps::Float64, check::Bool, observations::EmptyChoiceMap)
   @ Gen ~/.julia/packages/Gen/DzPIu/src/inference/hmc.jl:36
 [4] hmc(trace::var"##StaticIRTrace_nl9#4344", selection::DynamicSelection)
   @ Gen ~/.julia/packages/Gen/DzPIu/src/inference/hmc.jl:28
@femtomc femtomc self-assigned this Apr 18, 2022
@femtomc femtomc linked a pull request Apr 18, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant