diff --git a/Project.toml b/Project.toml index 6b478a12..7202822b 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "Bijectors" uuid = "76274a88-744f-5084-9051-94815aaf08c4" -version = "0.10.4" +version = "0.10.5" [deps] ArgCheck = "dce04be8-c92d-5529-be00-80e4d2c0e197" diff --git a/src/chainrules.jl b/src/chainrules.jl index a7071649..45cacf82 100644 --- a/src/chainrules.jl +++ b/src/chainrules.jl @@ -155,3 +155,6 @@ function ChainRulesCore.rrule(::typeof(_transform_inverse_ordered), x::AbstractM return y, _transform_inverse_ordered_adjoint end + +# Fixes Zygote's issues with `@debug` +ChainRulesCore.@non_differentiable _debug(::Any) \ No newline at end of file diff --git a/src/compat/zygote.jl b/src/compat/zygote.jl index e2adf050..362915a7 100644 --- a/src/compat/zygote.jl +++ b/src/compat/zygote.jl @@ -1,9 +1,8 @@ -using .Zygote: Zygote, @adjoint, @nograd, pullback +using .Zygote: Zygote, @adjoint, pullback using Compat: eachcol @adjoint istraining() = true, _ -> nothing -@nograd Bijectors._debug @adjoint function mapvcat(f, args...) g(f, args...) = map(f, args...)