Hello, I’m using Turing and having some issues. To reproduce this, I’ll provide about as simple of an example as I can generate. Let’s take the basic example from the docs (Probablistic Programming in Thirty Seconds) and modify it only slightly by including a user-generated distribution, with the exact specifications from the docs (Advanced Usage). Then, all that needs to be done is to include these lines of code (defining the struct, and the two functions) and to modify the model declaration so that
p ~ Beta(1,1) changes to
p ~ CustomUniform(). When I run this code, I get the following error:
LoadError: MethodError: no method matching iterate(::CustomUniform)
What I know so far (disclaimer: I’m fairly new to Julia with more experience in some other languages) is that
iterate is not meant to be defined for a distribution, but may be useful for something like an
AbstractRNG. Is there a reason I’m getting this error? Maybe something I’ve typed in wrong? I can copy and paste my roughly 40 lines of code but they are quite literally copied and pasted from the docs… anyways, I’d really appreciate any feedback!