DistributionsAD.jl
                                
                                 DistributionsAD.jl copied to clipboard
                                
                                    DistributionsAD.jl copied to clipboard
                            
                            
                            
                        Incompatible with AbstractGPs.jl
AbstractGPs.jl has the following default implementation (https://github.com/JuliaGaussianProcesses/AbstractGPs.jl/blob/04e4c53a3a66c62c83cdb4f47aabcfb04543acf4/src/abstract_gp/finite_gp.jl#L298-L309):
function Distributions._logpdf(f::FiniteGP, y::AbstractVector{<:Real})
    return first(logpdf(f, reshape(y, :, 1)))
end
...
function Distributions.logpdf(f::FiniteGP, Y::AbstractMatrix{<:Real})
    m, C_mat = mean_and_cov(f)
    C = cholesky(_symmetric(C_mat))
    T = promote_type(eltype(m), eltype(C), eltype(Y))
    return -((size(Y, 1) * T(log(2π)) + logdet(C)) .+ diag_Xt_invA_X(C, Y .- m)) ./ 2
end
This means that
https://github.com/TuringLang/DistributionsAD.jl/blob/fe2070012167b78c84a49733a0a64997e9533812/src/zygote.jl#L70-L79
will recursive indefinitively :confused:
Should we maybe remove that the adjoint above? TBH it seems a bit too general.
@yebai @mohamed82008 @devmotion
Try removing it, see if tests fail.