TuringLang / Turing.jl

Bayesian inference with probabilistic programming.
https://turinglang.org
MIT License
2.04k stars 219 forks source link

Missing method `invlink` in Bijectors 0.6 #1158

Closed yebai closed 4 years ago

yebai commented 4 years ago
Simplex Tracker AD: Error During Test at /home/runner/work/Turing.jl/Turing.jl/test/core/ad.jl:264
  Got exception outside of a @test
  MethodError: no method matching invlink(::Dirichlet{Float64}, ::SubArray{Float64,1,Array{Float64,1},Tuple{UnitRange{Int64}},true}, ::Type{Val{true}})
  Closest candidates are:
    invlink(::Dirichlet, !Matched::TrackedArray, ::Type{Val{proj}}) where proj at /home/runner/work/Turing.jl/Turing.jl/src/core/ad.jl:163
    invlink(::Dirichlet, ::Union{AbstractArray{#s25,1}, AbstractArray{#s25,2}} where #s25<:Real) at /home/runner/.julia/packages/Bijectors/HASjP/src/Bijectors.jl:277
    invlink(::Dirichlet, ::Union{AbstractArray{#s23,1}, AbstractArray{#s23,2}} where #s23<:Real, !Matched::Bool) at /home/runner/.julia/packages/Bijectors/HASjP/src/Bijectors.jl:277

See https://github.com/TuringLang/Turing.jl/runs/502574050#step:4:258

mohamed82008 commented 4 years ago

It's invlink(dist, x, true) now, not invlink(dist, x, Val{true}) as before.

mohamed82008 commented 4 years ago

I will update the Bijectors support in Turing in the Zygote PR.