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

04_hidden-markov-model run error #425

Closed
mrchaos opened this issue Oct 4, 2023 · 2 comments
Closed

04_hidden-markov-model run error #425

mrchaos opened this issue Oct 4, 2023 · 2 comments

Comments

@mrchaos
Copy link
Contributor

mrchaos commented Oct 4, 2023

When I run the below code from the tutorial "04 hidden markove model", I get the following error. I was wondering what could be the cause. Please let me know

I am using julia v1.9.2 and Turing v0.29.0.

CODE: 04-hidden-markov-model

g = Gibbs(HMC(0.01, 50, :m, :T), PG(120, :s))
chn = sample(BayesHmm(y, 3), g, 1000);

Error:

BoundsError: attempt to access 2-element ReverseDiff.TrackedArray{Float64, Float64, 1, Vector{Float64}, Vector{Float64}} at index [3:3]

throw_boundserror(::ReverseDiff.TrackedArray{Float64, Float64, 1, Vector{Float64}, Vector{Float64}}, ::Tuple{UnitRange{Int64}})@abstractarray.jl:744
[email protected]:709[inlined]
[email protected]:177[inlined]
[email protected]:318[inlined]
[email protected]:317[inlined]
[email protected]:194[inlined]
invlink_with_logpdf@abstract_varinfo.jl:679[inlined]
assume@context_implementations.jl:197[inlined]
[email protected]:461[inlined]
tilde_assume@context_implementations.jl:49[inlined]
tilde_assume@context_implementations.jl:46[inlined]
tilde_assume@context_implementations.jl:31[inlined]
tilde_assume!!(::DynamicPPL.SamplingContext{DynamicPPL.Sampler{Turing.Inference.HMC{Turing.Essential.ReverseDiffAD{false}, (:m, :T), AdvancedHMC.UnitEuclideanMetric}}, DynamicPPL.DefaultContext, Random.TaskLocalRNG}, ::Distributions.Dirichlet{Float64, Vector{Float64}, Float64}, ::AbstractPPL.VarName{:T, Setfield.IndexLens{Tuple{Int64}}}, ::DynamicPPL.ThreadSafeVarInfo{DynamicPPL.TypedVarInfo{NamedTuple{(:T, :m, :s), Tuple{DynamicPPL.Metadata{Dict{AbstractPPL.VarName{:T, Setfield.IndexLens{Tuple{Int64}}}, Int64}, Vector{Distributions.Dirichlet{Float64, Vector{Float64}, Float64}}, Vector{AbstractPPL.VarName{:T, Setfield.IndexLens{Tuple{Int64}}}}, ReverseDiff.TrackedArray{Float64, Float64, 1, Vector{Float64}, Vector{Float64}}, Vector{Set{DynamicPPL.Selector}}}, DynamicPPL.Metadata{Dict{AbstractPPL.VarName{:m, Setfield.IndexLens{Tuple{Int64}}}, Int64}, Vector{Distributions.Normal{Float64}}, Vector{AbstractPPL.VarName{:m, Setfield.IndexLens{Tuple{Int64}}}}, ReverseDiff.TrackedArray{Float64, Float64, 1, Vector{Float64}, Vector{Float64}}, Vector{Set{DynamicPPL.Selector}}}, DynamicPPL.Metadata{Dict{AbstractPPL.VarName{:s, Setfield.IndexLens{Tuple{Int64}}}, Int64}, Vector{Distributions.Categorical{Float64, Vector{Float64}}}, Vector{AbstractPPL.VarName{:s, Setfield.IndexLens{Tuple{Int64}}}}, Vector{Int64}, Vector{Set{DynamicPPL.Selector}}}}}, ReverseDiff.TrackedReal{Float64, Float64, ReverseDiff.TrackedArray{Float64, Float64, 1, Vector{Float64}, Vector{Float64}}}}, Vector{Base.RefValue{ReverseDiff.TrackedReal{Float64, Float64, ReverseDiff.TrackedArray{Float64, Float64, 1, Vector{Float64}, Vector{Float64}}}}}})@context_implementations.jl:117
BayesHmm(::DynamicPPL.Model{typeof(Main.var"workspace#192".BayesHmm), (:y, :K), (), (), Tuple{Vector{Float64}, Int64}, Tuple{}, DynamicPPL.DefaultContext}, ::DynamicPPL.ThreadSafeVarInfo{DynamicPPL.TypedVarInfo{NamedTuple{(:T, :m, :s), Tuple{DynamicPPL.Metadata{Dict{AbstractPPL.VarName{:T, Setfield.IndexLens{Tuple{Int64}}}, Int64}, Vector{Distributions.Dirichlet{Float64, Vector{Float64}, Float64}}, Vector{AbstractPPL.VarName{:T, Setfield.IndexLens{Tuple{Int64}}}}, ReverseDiff.TrackedArray{Float64, Float64, 1, Vector{Float64}, Vector{Float64}}, Vector{Set{DynamicPPL.Selector}}}, DynamicPPL.Metadata{Dict{AbstractPPL.VarName{:m, Setfield.IndexLens{Tuple{Int64}}}, Int64}, Vector{Distributions.Normal{Float64}}, Vector{AbstractPPL.VarName{:m, Setfield.IndexLens{Tuple{Int64}}}}, ReverseDiff.TrackedArray{Float64, Float64, 1, Vector{Float64}, Vector{Float64}}, Vector{Set{DynamicPPL.Selector}}}, DynamicPPL.Metadata{Dict{AbstractPPL.VarName{:s, Setfield.IndexLens{Tuple{Int64}}}, Int64}, Vector{Distributions.Categorical{Float64, Vector{Float64}}}, Vector{AbstractPPL.VarName{:s, Setfield.IndexLens{Tuple{Int64}}}}, Vector{Int64}, Vector{Set{DynamicPPL.Selector}}}}}, ReverseDiff.TrackedReal{Float64, Float64, ReverseDiff.TrackedArray{Float64, Float64, 1, Vector{Float64}, Vector{Float64}}}}, Vector{Base.RefValue{ReverseDiff.TrackedReal{Float64, Float64, ReverseDiff.TrackedArray{Float64, Float64, 1, Vector{Float64}, Vector{Float64}}}}}}, ::DynamicPPL.SamplingContext{DynamicPPL.Sampler{Turing.Inference.HMC{Turing.Essential.ReverseDiffAD{false}, (:m, :T), AdvancedHMC.UnitEuclideanMetric}}, DynamicPPL.DefaultContext, Random.TaskLocalRNG}, ::Vector{Float64}, ::Int64)@[Other: 19]
[email protected]:963[inlined]
evaluate_threadsafe!!(::DynamicPPL.Model{typeof(Main.var"workspace#192".BayesHmm), (:y, :K), (), (), Tuple{Vector{Float64}, Int64}, Tuple{}, DynamicPPL.DefaultContext}, ::DynamicPPL.TypedVarInfo{NamedTuple{(:T, :m, :s), Tuple{DynamicPPL.Metadata{Dict{AbstractPPL.VarName{:T, Setfield.IndexLens{Tuple{Int64}}}, Int64}, Vector{Distributions.Dirichlet{Float64, Vector{Float64}, Float64}}, Vector{AbstractPPL.VarName{:T, Setfield.IndexLens{Tuple{Int64}}}}, ReverseDiff.TrackedArray{Float64, Float64, 1, Vector{Float64}, Vector{Float64}}, Vector{Set{DynamicPPL.Selector}}}, DynamicPPL.Metadata{Dict{AbstractPPL.VarName{:m, Setfield.IndexLens{Tuple{Int64}}}, Int64}, Vector{Distributions.Normal{Float64}}, Vector{AbstractPPL.VarName{:m, Setfield.IndexLens{Tuple{Int64}}}}, ReverseDiff.TrackedArray{Float64, Float64, 1, Vector{Float64}, Vector{Float64}}, Vector{Set{DynamicPPL.Selector}}}, DynamicPPL.Metadata{Dict{AbstractPPL.VarName{:s, Setfield.IndexLens{Tuple{Int64}}}, Int64}, Vector{Distributions.Categorical{Float64, Vector{Float64}}}, Vector{AbstractPPL.VarName{:s, Setfield.IndexLens{Tuple{Int64}}}}, Vector{Int64}, Vector{Set{DynamicPPL.Selector}}}}}, ReverseDiff.TrackedReal{Float64, Float64, ReverseDiff.TrackedArray{Float64, Float64, 1, Vector{Float64}, Vector{Float64}}}}, ::DynamicPPL.SamplingContext{DynamicPPL.Sampler{Turing.Inference.HMC{Turing.Essential.ReverseDiffAD{false}, (:m, :T), AdvancedHMC.UnitEuclideanMetric}}, DynamicPPL.DefaultContext, Random.TaskLocalRNG})@model.jl:952
[email protected]:887[inlined]
logdensity(::DynamicPPL.LogDensityFunction{DynamicPPL.TypedVarInfo{NamedTuple{(:T, :m, :s), Tuple{DynamicPPL.Metadata{Dict{AbstractPPL.VarName{:T, Setfield.IndexLens{Tuple{Int64}}}, Int64}, Vector{Distributions.Dirichlet{Float64, Vector{Float64}, Float64}}, Vector{AbstractPPL.VarName{:T, Setfield.IndexLens{Tuple{Int64}}}}, Vector{Float64}, Vector{Set{DynamicPPL.Selector}}}, DynamicPPL.Metadata{Dict{AbstractPPL.VarName{:m, Setfield.IndexLens{Tuple{Int64}}}, Int64}, Vector{Distributions.Normal{Float64}}, Vector{AbstractPPL.VarName{:m, Setfield.IndexLens{Tuple{Int64}}}}, Vector{Float64}, Vector{Set{DynamicPPL.Selector}}}, DynamicPPL.Metadata{Dict{AbstractPPL.VarName{:s, Setfield.IndexLens{Tuple{Int64}}}, Int64}, Vector{Distributions.Categorical{Float64, Vector{Float64}}}, Vector{AbstractPPL.VarName{:s, Setfield.IndexLens{Tuple{Int64}}}}, Vector{Int64}, Vector{Set{DynamicPPL.Selector}}}}}, Float64}, DynamicPPL.Model{typeof(Main.var"workspace#192".BayesHmm), (:y, :K), (), (), Tuple{Vector{Float64}, Int64}, Tuple{}, DynamicPPL.DefaultContext}, DynamicPPL.SamplingContext{DynamicPPL.Sampler{Turing.Inference.HMC{Turing.Essential.ReverseDiffAD{false}, (:m, :T), AdvancedHMC.UnitEuclideanMetric}}, DynamicPPL.DefaultContext, Random.TaskLocalRNG}}, ::ReverseDiff.TrackedArray{Float64, Float64, 1, Vector{Float64}, Vector{Float64}})@logdensityfunction.jl:94
[email protected]:1108[inlined]
ReverseDiff.GradientTape(::Base.Fix1{typeof(LogDensityProblems.logdensity), DynamicPPL.LogDensityFunction{DynamicPPL.TypedVarInfo{NamedTuple{(:T, :m, :s), Tuple{DynamicPPL.Metadata{Dict{AbstractPPL.VarName{:T, Setfield.IndexLens{Tuple{Int64}}}, Int64}, Vector{Distributions.Dirichlet{Float64, Vector{Float64}, Float64}}, Vector{AbstractPPL.VarName{:T, Setfield.IndexLens{Tuple{Int64}}}}, Vector{Float64}, Vector{Set{DynamicPPL.Selector}}}, DynamicPPL.Metadata{Dict{AbstractPPL.VarName{:m, Setfield.IndexLens{Tuple{Int64}}}, Int64}, Vector{Distributions.Normal{Float64}}, Vector{AbstractPPL.VarName{:m, Setfield.IndexLens{Tuple{Int64}}}}, Vector{Float64}, Vector{Set{DynamicPPL.Selector}}}, DynamicPPL.Metadata{Dict{AbstractPPL.VarName{:s, Setfield.IndexLens{Tuple{Int64}}}, Int64}, Vector{Distributions.Categorical{Float64, Vector{Float64}}}, Vector{AbstractPPL.VarName{:s, Setfield.IndexLens{Tuple{Int64}}}}, Vector{Int64}, Vector{Set{DynamicPPL.Selector}}}}}, Float64}, DynamicPPL.Model{typeof(Main.var"workspace#192".BayesHmm), (:y, :K), (), (), Tuple{Vector{Float64}, Int64}, Tuple{}, DynamicPPL.DefaultContext}, DynamicPPL.SamplingContext{DynamicPPL.Sampler{Turing.Inference.HMC{Turing.Essential.ReverseDiffAD{false}, (:m, :T), AdvancedHMC.UnitEuclideanMetric}}, DynamicPPL.DefaultContext, Random.TaskLocalRNG}}}, ::Vector{Float64}, ::ReverseDiff.GradientConfig{ReverseDiff.TrackedArray{Float64, Float64, 1, Vector{Float64}, Vector{Float64}}})@tape.jl:199
gradient!(::DiffResults.MutableDiffResult{1, Float64, Tuple{Vector{Float64}}}, ::Function, ::Vector{Float64}, ::ReverseDiff.GradientConfig{ReverseDiff.TrackedArray{Float64, Float64, 1, Vector{Float64}, Vector{Float64}}})@gradients.jl:41
[email protected]:41[inlined]
logdensity_and_gradient(::LogDensityProblemsADReverseDiffExt.ReverseDiffLogDensity{DynamicPPL.LogDensityFunction{DynamicPPL.TypedVarInfo{NamedTuple{(:T, :m, :s), Tuple{DynamicPPL.Metadata{Dict{AbstractPPL.VarName{:T, Setfield.IndexLens{Tuple{Int64}}}, Int64}, Vector{Distributions.Dirichlet{Float64, Vector{Float64}, Float64}}, Vector{AbstractPPL.VarName{:T, Setfield.IndexLens{Tuple{Int64}}}}, Vector{Float64}, Vector{Set{DynamicPPL.Selector}}}, DynamicPPL.Metadata{Dict{AbstractPPL.VarName{:m, Setfield.IndexLens{Tuple{Int64}}}, Int64}, Vector{Distributions.Normal{Float64}}, Vector{AbstractPPL.VarName{:m, Setfield.IndexLens{Tuple{Int64}}}}, Vector{Float64}, Vector{Set{DynamicPPL.Selector}}}, DynamicPPL.Metadata{Dict{AbstractPPL.VarName{:s, Setfield.IndexLens{Tuple{Int64}}}, Int64}, Vector{Distributions.Categorical{Float64, Vector{Float64}}}, Vector{AbstractPPL.VarName{:s, Setfield.IndexLens{Tuple{Int64}}}}, Vector{Int64}, Vector{Set{DynamicPPL.Selector}}}}}, Float64}, DynamicPPL.Model{typeof(Main.var"workspace#192".BayesHmm), (:y, :K), (), (), Tuple{Vector{Float64}, Int64}, Tuple{}, DynamicPPL.DefaultContext}, DynamicPPL.SamplingContext{DynamicPPL.Sampler{Turing.Inference.HMC{Turing.Essential.ReverseDiffAD{false}, (:m, :T), AdvancedHMC.UnitEuclideanMetric}}, DynamicPPL.DefaultContext, Random.TaskLocalRNG}}, Nothing}, ::Vector{Float64})@LogDensityProblemsADReverseDiffExt.jl:72
∂logπ∂θ@hmc.jl:160[inlined]
∂H∂θ@hamiltonian.jl:38[inlined]
phasepoint(::AdvancedHMC.Hamiltonian{AdvancedHMC.UnitEuclideanMetric{Float64, Tuple{Int64}}, AdvancedHMC.GaussianKinetic, Base.Fix1{typeof(LogDensityProblems.logdensity), LogDensityProblemsADReverseDiffExt.ReverseDiffLogDensity{DynamicPPL.LogDensityFunction{DynamicPPL.TypedVarInfo{NamedTuple{(:T, :m, :s), Tuple{DynamicPPL.Metadata{Dict{AbstractPPL.VarName{:T, Setfield.IndexLens{Tuple{Int64}}}, Int64}, Vector{Distributions.Dirichlet{Float64, Vector{Float64}, Float64}}, Vector{AbstractPPL.VarName{:T, Setfield.IndexLens{Tuple{Int64}}}}, Vector{Float64}, Vector{Set{DynamicPPL.Selector}}}, DynamicPPL.Metadata{Dict{AbstractPPL.VarName{:m, Setfield.IndexLens{Tuple{Int64}}}, Int64}, Vector{Distributions.Normal{Float64}}, Vector{AbstractPPL.VarName{:m, Setfield.IndexLens{Tuple{Int64}}}}, Vector{Float64}, Vector{Set{DynamicPPL.Selector}}}, DynamicPPL.Metadata{Dict{AbstractPPL.VarName{:s, Setfield.IndexLens{Tuple{Int64}}}, Int64}, Vector{Distributions.Categorical{Float64, Vector{Float64}}}, Vector{AbstractPPL.VarName{:s, Setfield.IndexLens{Tuple{Int64}}}}, Vector{Int64}, Vector{Set{DynamicPPL.Selector}}}}}, Float64}, DynamicPPL.Model{typeof(Main.var"workspace#192".BayesHmm), (:y, :K), (), (), Tuple{Vector{Float64}, Int64}, Tuple{}, DynamicPPL.DefaultContext}, DynamicPPL.SamplingContext{DynamicPPL.Sampler{Turing.Inference.HMC{Turing.Essential.ReverseDiffAD{false}, (:m, :T), AdvancedHMC.UnitEuclideanMetric}}, DynamicPPL.DefaultContext, Random.TaskLocalRNG}}, Nothing}}, Turing.Inference.var"#∂logπ∂θ#38"{LogDensityProblemsADReverseDiffExt.ReverseDiffLogDensity{DynamicPPL.LogDensityFunction{DynamicPPL.TypedVarInfo{NamedTuple{(:T, :m, :s), Tuple{DynamicPPL.Metadata{Dict{AbstractPPL.VarName{:T, Setfield.IndexLens{Tuple{Int64}}}, Int64}, Vector{Distributions.Dirichlet{Float64, Vector{Float64}, Float64}}, Vector{AbstractPPL.VarName{:T, Setfield.IndexLens{Tuple{Int64}}}}, Vector{Float64}, Vector{Set{DynamicPPL.Selector}}}, DynamicPPL.Metadata{Dict{AbstractPPL.VarName{:m, Setfield.IndexLens{Tuple{Int64}}}, Int64}, Vector{Distributions.Normal{Float64}}, Vector{AbstractPPL.VarName{:m, Setfield.IndexLens{Tuple{Int64}}}}, Vector{Float64}, Vector{Set{DynamicPPL.Selector}}}, DynamicPPL.Metadata{Dict{AbstractPPL.VarName{:s, Setfield.IndexLens{Tuple{Int64}}}, Int64}, Vector{Distributions.Categorical{Float64, Vector{Float64}}}, Vector{AbstractPPL.VarName{:s, Setfield.IndexLens{Tuple{Int64}}}}, Vector{Int64}, Vector{Set{DynamicPPL.Selector}}}}}, Float64}, DynamicPPL.Model{typeof(Main.var"workspace#192".BayesHmm), (:y, :K), (), (), Tuple{Vector{Float64}, Int64}, Tuple{}, DynamicPPL.DefaultContext}, DynamicPPL.SamplingContext{DynamicPPL.Sampler{Turing.Inference.HMC{Turing.Essential.ReverseDiffAD{false}, (:m, :T), AdvancedHMC.UnitEuclideanMetric}}, DynamicPPL.DefaultContext, Random.TaskLocalRNG}}, Nothing}}}, ::Vector{Float64}, ::Vector{Float64})@hamiltonian.jl:80
[email protected]:159[inlined]
var"#initialstep#37"(::Nothing, ::Int64, ::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, ::typeof(DynamicPPL.initialstep), ::Random.TaskLocalRNG, ::DynamicPPL.Model{typeof(Main.var"workspace#192".BayesHmm), (:y, :K), (), (), Tuple{Vector{Float64}, Int64}, Tuple{}, DynamicPPL.DefaultContext}, ::DynamicPPL.Sampler{Turing.Inference.HMC{Turing.Essential.ReverseDiffAD{false}, (:m, :T), AdvancedHMC.UnitEuclideanMetric}}, ::DynamicPPL.TypedVarInfo{NamedTuple{(:T, :m, :s), Tuple{DynamicPPL.Metadata{Dict{AbstractPPL.VarName{:T, Setfield.IndexLens{Tuple{Int64}}}, Int64}, Vector{Distributions.Dirichlet{Float64, Vector{Float64}, Float64}}, Vector{AbstractPPL.VarName{:T, Setfield.IndexLens{Tuple{Int64}}}}, Vector{Float64}, Vector{Set{DynamicPPL.Selector}}}, DynamicPPL.Metadata{Dict{AbstractPPL.VarName{:m, Setfield.IndexLens{Tuple{Int64}}}, Int64}, Vector{Distributions.Normal{Float64}}, Vector{AbstractPPL.VarName{:m, Setfield.IndexLens{Tuple{Int64}}}}, Vector{Float64}, Vector{Set{DynamicPPL.Selector}}}, DynamicPPL.Metadata{Dict{AbstractPPL.VarName{:s, Setfield.IndexLens{Tuple{Int64}}}, Int64}, Vector{Distributions.Categorical{Float64, Vector{Float64}}}, Vector{AbstractPPL.VarName{:s, Setfield.IndexLens{Tuple{Int64}}}}, Vector{Int64}, Vector{Set{DynamicPPL.Selector}}}}}, Float64})@hmc.jl:164
(::Turing.Inference.var"#85#87"{Base.Pairs{Symbol, Nothing, Tuple{Symbol}, NamedTuple{(:init_params,), Tuple{Nothing}}}, Random.TaskLocalRNG, DynamicPPL.Model{typeof(Main.var"workspace#192".BayesHmm), (:y, :K), (), (), Tuple{Vector{Float64}, Int64}, Tuple{}, DynamicPPL.DefaultContext}})(::DynamicPPL.Sampler{Turing.Inference.HMC{Turing.Essential.ReverseDiffAD{false}, (:m, :T), AdvancedHMC.UnitEuclideanMetric}})@gibbs.jl:209
[email protected]:274[inlined]
var"#initialstep#83"(::Base.Pairs{Symbol, Nothing, Tuple{Symbol}, NamedTuple{(:init_params,), Tuple{Nothing}}}, ::typeof(DynamicPPL.initialstep), ::Random.TaskLocalRNG, ::DynamicPPL.Model{typeof(Main.var"workspace#192".BayesHmm), (:y, :K), (), (), Tuple{Vector{Float64}, Int64}, Tuple{}, DynamicPPL.DefaultContext}, ::DynamicPPL.Sampler{Turing.Inference.Gibbs{(:m, :T, :s), 2, Tuple{Turing.Inference.HMC{Turing.Essential.ReverseDiffAD{false}, (:m, :T), AdvancedHMC.UnitEuclideanMetric}, Turing.Inference.PG{(:s,), AdvancedPS.ResampleWithESSThreshold{typeof(AdvancedPS.resample_systematic), Float64}}}, Tuple{Int64, Int64}}}, ::DynamicPPL.TypedVarInfo{NamedTuple{(:T, :m, :s), Tuple{DynamicPPL.Metadata{Dict{AbstractPPL.VarName{:T, Setfield.IndexLens{Tuple{Int64}}}, Int64}, Vector{Distributions.Dirichlet{Float64, Vector{Float64}, Float64}}, Vector{AbstractPPL.VarName{:T, Setfield.IndexLens{Tuple{Int64}}}}, Vector{Float64}, Vector{Set{DynamicPPL.Selector}}}, DynamicPPL.Metadata{Dict{AbstractPPL.VarName{:m, Setfield.IndexLens{Tuple{Int64}}}, Int64}, Vector{Distributions.Normal{Float64}}, Vector{AbstractPPL.VarName{:m, Setfield.IndexLens{Tuple{Int64}}}}, Vector{Float64}, Vector{Set{DynamicPPL.Selector}}}, DynamicPPL.Metadata{Dict{AbstractPPL.VarName{:s, Setfield.IndexLens{Tuple{Int64}}}, Int64}, Vector{Distributions.Categorical{Float64, Vector{Float64}}}, Vector{AbstractPPL.VarName{:s, Setfield.IndexLens{Tuple{Int64}}}}, Vector{Int64}, Vector{Set{DynamicPPL.Selector}}}}}, Float64})@gibbs.jl:202
var"#step#63"(::Nothing, ::Nothing, ::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, ::typeof(AbstractMCMC.step), ::Random.TaskLocalRNG, ::DynamicPPL.Model{typeof(Main.var"workspace#192".BayesHmm), (:y, :K), (), (), Tuple{Vector{Float64}, Int64}, Tuple{}, DynamicPPL.DefaultContext}, ::DynamicPPL.Sampler{Turing.Inference.Gibbs{(:m, :T, :s), 2, Tuple{Turing.Inference.HMC{Turing.Essential.ReverseDiffAD{false}, (:m, :T), AdvancedHMC.UnitEuclideanMetric}, Turing.Inference.PG{(:s,), AdvancedPS.ResampleWithESSThreshold{typeof(AdvancedPS.resample_systematic), Float64}}}, Tuple{Int64, Int64}}})@sampler.jl:111
[email protected]:84[inlined]
macro [email protected]:125[inlined]
macro [email protected]:328[inlined]
macro [email protected]:9[inlined]
var"#mcmcsample#20"(::Bool, ::String, ::Nothing, ::Int64, ::Int64, ::Type, ::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, ::typeof(AbstractMCMC.mcmcsample), ::Random.TaskLocalRNG, ::DynamicPPL.Model{typeof(Main.var"workspace#192".BayesHmm), (:y, :K), (), (), Tuple{Vector{Float64}, Int64}, Tuple{}, DynamicPPL.DefaultContext}, ::DynamicPPL.Sampler{Turing.Inference.Gibbs{(:m, :T, :s), 2, Tuple{Turing.Inference.HMC{Turing.Essential.ReverseDiffAD{false}, (:m, :T), AdvancedHMC.UnitEuclideanMetric}, Turing.Inference.PG{(:s,), AdvancedPS.ResampleWithESSThreshold{typeof(AdvancedPS.resample_systematic), Float64}}}, Tuple{Int64, Int64}}}, ::Int64)@sample.jl:116
var"#sample#3"(::Type, ::Nothing, ::Bool, ::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, ::typeof(StatsBase.sample), ::Random.TaskLocalRNG, ::DynamicPPL.Model{typeof(Main.var"workspace#192".BayesHmm), (:y, :K), (), (), Tuple{Vector{Float64}, Int64}, Tuple{}, DynamicPPL.DefaultContext}, ::DynamicPPL.Sampler{Turing.Inference.Gibbs{(:m, :T, :s), 2, Tuple{Turing.Inference.HMC{Turing.Essential.ReverseDiffAD{false}, (:m, :T), AdvancedHMC.UnitEuclideanMetric}, Turing.Inference.PG{(:s,), AdvancedPS.ResampleWithESSThreshold{typeof(AdvancedPS.resample_systematic), Float64}}}, Tuple{Int64, Int64}}}, ::Int64)@Inference.jl:208
[email protected]:197[inlined]
#sample#[email protected]:194[inlined]
[email protected]:187[inlined]
#sample#[email protected]:184[inlined]
sample(::DynamicPPL.Model{typeof(Main.var"workspace#192".BayesHmm), (:y, :K), (), (), Tuple{Vector{Float64}, Int64}, Tuple{}, DynamicPPL.DefaultContext}, ::Turing.Inference.Gibbs{(:m, :T, :s), 2, Tuple{Turing.Inference.HMC{Turing.Essential.ReverseDiffAD{false}, (:m, :T), AdvancedHMC.UnitEuclideanMetric}, Turing.Inference.PG{(:s,), AdvancedPS.ResampleWithESSThreshold{typeof(AdvancedPS.resample_systematic), Float64}}}, Tuple{Int64, Int64}}, ::Int64)@Inference.jl:178
@devmotion
Copy link
Member

TuringLang/Turing.jl#2074 and TuringLang/Turing.jl#2095 might be related. Possibly fixed by TuringLang/Turing.jl#2097?

@shravanngoswamii
Copy link
Member

shravanngoswamii commented May 30, 2024

@yebai yebai closed this as completed May 30, 2024
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

No branches or pull requests

4 participants