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

New model specification does not allow complex expressions for input arguments, only ::Symbol #147

Closed
bvdmitri opened this issue Dec 8, 2023 · 1 comment
Assignees

Comments

@bvdmitri
Copy link
Member

bvdmitri commented Dec 8, 2023

E.g. this fails

@model function coin_toss_model(x, n::Int)
    θ ~ Beta(4.0, 8.0)
    for i in 1:n
        x[i] ~ Bernoulli(θ)
    end
end
@bvdmitri
Copy link
Member Author

bvdmitri commented Dec 8, 2023

Another example, which throws a cryptic error message on model creation, but @model macro does not complain

 GraphPPL.@model function coin_toss_model(x, n + a)
    θ ~ Beta(4.0, 8.0)
    for i in 1:n
        x[i] ~ Bernoulli(θ)
    end
end

@bvdmitri bvdmitri changed the title New model specification does not allow type specification New model specification does not allow complex expressions for input arguments, only ::Symbol Dec 8, 2023
@wouterwln wouterwln self-assigned this Dec 8, 2023
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

When branches are created from issues, their pull requests are automatically linked.

2 participants