I am trying to run the Simple Gaussian Demo found here: https://turing.ml/v0.22/docs/using-turing/guide. I have copied the gdemo model as written as well as c1-c6. c1 and c2 run without any errors, however for c3-c6 I am getting the same error; “ERROR: MethodError: no method matching ADgradient”. I am currently running Turing v0.23.3. I tried updating Zygote, LogDensityProblemsAD, and ForwardDiff all to no avail. Any suggestions on how to get this resolved, or is anyone else having similar issues? Thanks!
I also am getting the same error using Turing v0.23.3 and 0.24.1.
v0.24.2. and 0.24.3 seems to work for me. However, I have issues using truncated(), but that’s a different issue. If you aren’t going to need truncated(), you could try updating to 0.24.2 or 3 using ] add Turing@0.24.3 or just ] update Turing
I suspect that you have other packages limiting your Turing upgrade though?
Correct, I am definitely having dependency issues. I tried creating a new environment and only adding Turing@0.24.3, but got a conflict with AbstractPPL and DynamicPPL. Is this consistent amongst other users? Any ways to resolve the dependency issues?
(new-turing) pkg> add Turing@0.24.3
Resolving package versions...
ERROR: Unsatisfiable requirements detected for package AbstractPPL [7a57a42e]:
AbstractPPL [7a57a42e] log:
├─possible versions are: 0.1.0-0.6.2 or uninstalled
├─restricted by julia compatibility requirements to versions: 0.1.0-0.5.2 or uninstalled
├─restricted by compatibility requirements with AbstractMCMC [80f14c24] to versions: 0.5.2-0.6.2 or uninstalled, leaving only versions: 0.5.2 or uninstalled
│ └─AbstractMCMC [80f14c24] log:
│ ├─possible versions are: 0.1.0-4.4.0 or uninstalled
│ └─restricted by compatibility requirements with Turing [fce5fe82] to versions: 4.0.0-4.4.0
│ └─Turing [fce5fe82] log:
│ ├─possible versions are: 0.5.0-0.24.3 or uninstalled
│ └─restricted to versions 0.24.3 by an explicit requirement, leaving only versions 0.24.3
└─restricted by compatibility requirements with DynamicPPL [366bfd00] to versions: 0.5.3-0.5.4 — no versions left
└─DynamicPPL [366bfd00] log:
├─possible versions are: 0.1.0-0.22.2 or uninstalled
└─restricted by compatibility requirements with Turing [fce5fe82] to versions: 0.21.5-0.21.6
└─Turing [fce5fe82] log: see above
restricted by julia compatibility requirements to versions
it looks like it’s a julia version requirement for the updated AbstractPPL package.
What’s your version of Julia? I suspect that if you upgrade to a later release, this will satisfy the AbstractPPL (and other) compat requirements.
TBH, I don’t fully understand the syntax of the compat restrictions in Project.toml files… I have Julia v1.8.5, but the Project.toml lists:
julia = "~1.6.6, 1.7.3"
So I would have thought I would need one of those specific versions, but Turing v0.24.3 and AbstractPPL v0.5.4 install fine on my machine with Julia v1.8.5. I guess I need to go read up about how the [compat] section works in Project.toml files.