You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using Cassette, Turing
Cassette.@context AssumeCtx
@modelgdemo(x) =begin
s ~InverseGamma(2, 3)
m ~Normal(0, sqrt(s))
x ~Normal(m, sqrt(s))
return s, m
end
m =gdemo(1.0)
samples = Cassette.overdub(AssumeCtx(), sample, m, MH(10));
Results in the following error
ERROR: type DataType has no field var
Stacktrace:
[1] getproperty at ./sysimg.jl:15 [inlined]
[2] call at /home/tor/.julia/dev/Cassette/src/context.jl:447 [inlined]
[3] fallback at /home/tor/.julia/dev/Cassette/src/context.jl:445 [inlined]
[4] overdub at /home/tor/.julia/dev/Cassette/src/context.jl:271 [inlined]
[5] supertype at ./operators.jl:50 [inlined]
[6] overdub(::Cassette.Context{nametype(AssumeCtx),Nothing,Nothing,getfield(Cassette, Symbol("##PassType#363")),Nothing,Nothing}, ::typeof(supertype), ::Type{Array{T,1} where T}) at /home/tor/.julia/dev/Cassette/src/overdub.jl:0
[7] typejoin at ./promotion.jl:116 [inlined]
[8] overdub(::Cassette.Context{nametype(AssumeCtx),Nothing,Nothing,getfield(Cassette, Symbol("##PassType#363")),Nothing,Nothing}, ::typeof(typejoin), ::Type{StepRange{Int64,Int64}}, ::Type{Array{T,1} where T}) at /home/tor/.julia/dev/Cassette/src/overdub.jl:0
[9] typejoin at ./promotion.jl:28 [inlined]
[10] overdub(::Cassette.Context{nametype(AssumeCtx),Nothing,Nothing,getfield(Cassette, Symbol("##PassType#363")),Nothing,Nothing}, ::typeof(typejoin), ::Type{StepRange{Int64,Int64}}, ::Type{Array{T,1} where T}) at /home/tor/.julia/dev/Cassette/src/overdub.jl:0
[11] promote_result at ./promotion.jl:242 [inlined]
[12] promote_type at ./promotion.jl:221 [inlined]
[13] overdub(::Cassette.Context{nametype(AssumeCtx),Nothing,Nothing,getfield(Cassette, Symbol("##PassType#363")),Nothing,Nothing}, ::typeof(promote_type), ::Type{StepRange{Int64,Int64}}, ::Type{Array{T,1} where T}) at /home/tor/.julia/dev/Cassette/src/overdub.jl:0
[14] promote_typeof at ./promotion.jl:264 [inlined]
[15] vect at ./array.jl:148 [inlined]
[16] overdub(::Cassette.Context{nametype(AssumeCtx),Nothing,Nothing,getfield(Cassette, Symbol("##PassType#363")),Nothing,Nothing}, ::typeof(Base.vect), ::StepRange{Int64,Int64}, ::Array{String,1}, ::Array{Int64,1}) at /home/tor/.julia/dev/Cassette/src/overdub.jl:0
[17] #Chains#12 at /home/tor/.julia/packages/MCMCChains/loNyJ/src/chains.jl:47 [inlined]
[18] overdub(::Cassette.Context{nametype(AssumeCtx),Nothing,Nothing,getfield(Cassette, Symbol("##PassType#363")),Nothing,Nothing}, ::getfield(MCMCChains, Symbol("##Chains#12")), ::Int64, ::Int64, ::Float64, ::NamedTuple{(:samples,),Tuple{Array{Turing.Utilities.Sample,1}}}, ::Type{Chains}, ::Array{Union{Missing, Float64},3}, ::Array{String,1}, ::Dict{Symbol,Array{String,1}}) at /home/tor/.julia/dev/Cassette/src/overdub.jl:0
[19] Type at ./none:0 [inlined]
[20] overdub(::Cassette.Context{nametype(AssumeCtx),Nothing,Nothing,getfield(Cassette, Symbol("##PassType#363")),Nothing,Nothing}, ::getfield(Core, Symbol("#kw#Type")), ::NamedTuple{(:evidence, :info),Tuple{Float64,NamedTuple{(:samples,),Tuple{Array{Turing.Utilities.Sample,1}}}}}, ::Type{Chains}, ::Array{Union{Missing, Float64},3}, ::Array{String,1}, ::Dict{Symbol,Array{String,1}}) at /home/tor/.julia/dev/Cassette/src/overdub.jl:0
[21] overdub(::Cassette.Context{nametype(AssumeCtx),Nothing,Nothing,getfield(Cassette, Symbol("##PassType#363")),Nothing,Nothing}, ::typeof(Turing.Utilities.Chain), ::Float64, ::Array{Turing.Utilities.Sample,1}) at /home/tor/.julia/dev/Turing/src/utilities/io.jl:84
[22] #sample#34 at /home/tor/.julia/dev/Turing/src/inference/mh.jl:171 [inlined]
[23] overdub(::Cassette.Context{nametype(AssumeCtx),Nothing,Nothing,getfield(Cassette, Symbol("##PassType#363")),Nothing,Nothing}, ::getfield(Turing.Inference, Symbol("##sample#34")), ::Bool, ::Nothing, ::Int64, ::typeof(sample), ::Turing.Model{Tuple{:s,:m},Tuple{:x},getfield(Main, Symbol("###inner_function#374#9")),NamedTuple{(:x,),Tuple{Float64}},NamedTuple{(:x,),Tuple{Symbol}}}, ::MH{()}) at /home/tor/.julia/dev/Cassette/src/overdub.jl:0
[24] sample at /home/tor/.julia/dev/Turing/src/inference/mh.jl:113 [inlined]
[25] overdub(::Cassette.Context{nametype(AssumeCtx),Nothing,Nothing,getfield(Cassette, Symbol("##PassType#363")),Nothing,Nothing}, ::typeof(sample), ::Turing.Model{Tuple{:s,:m},Tuple{:x},getfield(Main, Symbol("###inner_function#374#9")),NamedTuple{(:x,),Tuple{Float64}},NamedTuple{(:x,),Tuple{Symbol}}}, ::MH{()}) at /home/tor/.julia/dev/Cassette/src/overdub.jl:0
[26] top-level scope at none:0
I'm using Cassette#master here as it seemed potentially related to #127. It also failed when running on non-master Cassette.
Results in the following error
I'm using Cassette#master here as it seemed potentially related to #127. It also failed when running on non-master Cassette.
Given that https://github.com/JuliaLang/julia/blob/5aea4569e988c6e231a2d9204c7e39193b961891/base/operators.jl#L50 seems to be "causing" the issue, it's also probably related to #130?
versioninfo
dump:The text was updated successfully, but these errors were encountered: