-
Notifications
You must be signed in to change notification settings - Fork 9
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
Unknown expression / IR code typeof(var) = Core.SSAValue
#174
Comments
typeof(var) = Core.SSAValue
typeof(var) = Core.SSAValue
This code fails on 1.11 only, but the error is slightly different. It's causing test failures upstream TuringLang/Turing.jl#2341. using Turing
using Turing.RandomMeasures: ChineseRestaurantProcess, DirichletProcess
@model function imm(y, alpha, ::Type{M}=Vector{Float64}) where {M}
N = length(y)
rpm = DirichletProcess(alpha)
z = zeros(Int, N)
cluster_counts = zeros(Int, N)
fill!(cluster_counts, 0)
for i in 1:N
z[i] ~ ChineseRestaurantProcess(rpm, cluster_counts)
cluster_counts[z[i]] += 1
end
Kmax = findlast(!iszero, cluster_counts)
m = M(undef, Kmax)
for k in 1:Kmax
m[k] ~ Normal(1.0, 1.0)
end
end
model = imm(randn(100), 1.0)
sample(model, Gibbs(PG(10, :z), HMC(0.01, 4, :m)), 100) but the error is slightly different:
|
@penelopeysm Could you try this PR #175 on these cases? |
Do you know what this model looks like after it is expanded? I want to create a new test case for it. And also for this one:
@penelopeysm @yebai |
This code fails on both 1.10 and 1.11:
Note that if we change
b
to~ Normal(0, 1)
as well, the code runs fine on both 1.10 and 1.11, so the bug is something to do with the assignment in the model.In both cases the error is similar
The text was updated successfully, but these errors were encountered: