-
Notifications
You must be signed in to change notification settings - Fork 219
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
missing keyword arguments not property processed #2259
Comments
tried again with
|
TBH I'm uncertain if this is intended or not, but I do agree that the kwargs should be treated similarly to the argument. One way you can easily check what's considered random and what's considered "observed" is to just sample from the model: rand(Turing.OrderedDict, model) |
Btw, we generally recommend using @model function gdemo(x, ::Type{T}=Float64) where {T}
s² ~ InverseGamma(2, 3)
m ~ Normal(0, sqrt(s²))
x = Vector{T}(undef, 2)
for i in eachindex(x)
x[i] ~ Normal(m, sqrt(s²))
end
end
model = gdemo()
model_cond = model | (x = x_data,) Going forward this will be the recommended way of doing things. |
Thanks for the quick fix! Yes, I'll start using the |
Thank you for bringing up the issue:) Was not aware of this bug until you brought it up. |
The documentation gives an example of how the sample macro can be used to either condition a model or sample RVs:
If
x
is turned into a keyword argument, this example produces an error:The text was updated successfully, but these errors were encountered: