This is a simple program running on a clean enviroment but it produces an error message which I could not figure out.
using Pkg
Pkg.add("Distributions")
Pkg.add("Turing")
using Distributions
using Turing
testData = rand(Beta(3, 4), 100);
@model betaSample(rawdata) = begin
alpha ~ InverseGamma(2, 1/8)
beta ~ InverseGamma(2, 1/8)
for i in eachindex(rawdata)
rawdata[i] ~ Beta(alpha, beta)
end
end
result_MH = sample(betaSample(testData), MH(250))
Starting Julia...
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _ | |
| | |_| | | | (_| | | Version 1.8.5 (2023-01-08)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
project at `~/juliascript/Turing`
LoadError: proposals of type Int64 are not supported
Stacktrace:
[1] error(::String, ::Type, ::String)
@ Base ./error.jl:44
[2] proposal(x::Int64)
@ Turing.Inference ~/.julia/packages/Turing/Suzsv/src/inference/mh.jl:13
[3] MH(space::Int64)
@ Turing.Inference ~/.julia/packages/Turing/Suzsv/src/inference/mh.jl:173
[4] top-level scope
@ ~/juliascript/Turing/Turing_Example01.jl:16
[5] eval
@ ./boot.jl:368 [inlined]
[6] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
@ Base ./loading.jl:1428
in expression starting at /Users/ssiew/juliascript/Turing/Turing_Example01.jl:16
Updating registry at `~/.julia/registries/General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
Resolving package versions...
No Changes to `~/juliascript/Turing/Project.toml`
No Changes to `~/juliascript/Turing/Manifest.toml`
Resolving package versions...
No Changes to `~/juliascript/Turing/Project.toml`
No Changes to `~/juliascript/Turing/Manifest.toml`
ERROR: LoadError: proposals of type Int64 are not supported
Stacktrace:
[1] error(::String, ::Type, ::String)
@ Base ./error.jl:44
[2] proposal(x::Int64)
@ Turing.Inference ~/.julia/packages/Turing/Suzsv/src/inference/mh.jl:13
[3] MH(space::Int64)
@ Turing.Inference ~/.julia/packages/Turing/Suzsv/src/inference/mh.jl:173
[4] top-level scope
@ ~/juliascript/Turing/Turing_Example01.jl:19
[5] eval
@ ./boot.jl:368 [inlined]
[6] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
@ Base ./loading.jl:1428
in expression starting at /Users/ssiew/juliascript/Turing/Turing_Example01.jl:19
julia>
(Turing) pkg> status
Status `~/juliascript/Turing/Project.toml`
[31c24e10] Distributions v0.25.87
[fce5fe82] Turing v0.24.3
(Turing) pkg>