Skip to content

Distances 0.10.5 breaks tests #390

@theogf

Description

@theogf

Following this PR : JuliaStats/Distances.jl#221 and release (0.10.5), our "Others" started to fail.
In #381, the compat limit is set to 0.10.4 so tests can pass, but we should solve this issue at some point.

Error looks like:

Chain Rules: Error During Test at /home/runner/work/KernelFunctions.jl/KernelFunctions.jl/test/chainrules.jl:1
  Got exception outside of a @test
  Compiling Tuple{Distances.var"#SqMahalanobis#7#8",Bool,Type{SqMahalanobis},Array{Float64,2}}: try/catch is not supported.
  Stacktrace:
   [1] error(::String) at ./error.jl:33
   [2] instrument(::IRTools.Inner.IR) at /home/runner/.julia/packages/Zygote/rv6db/src/compiler/reverse.jl:121
   [3] #Primal#20 at /home/runner/.julia/packages/Zygote/rv6db/src/compiler/reverse.jl:202 [inlined]
   [4] Type at ./none:0 [inlined]
   [5] #Adjoint#36(::Nothing, ::Bool, ::Type{Zygote.Adjoint}, ::IRTools.Inner.IR) at /home/runner/.julia/packages/Zygote/rv6db/src/compiler/reverse.jl:315
   [6] (::Core.var"#kw#Type")(::NamedTuple{(:varargs, :normalise),Tuple{Nothing,Bool}}, ::Type{Zygote.Adjoint}, ::IRTools.Inner.IR) at ./none:0
   [7] _generate_pullback_via_decomposition(::Type) at /home/runner/.julia/packages/Zygote/rv6db/src/compiler/emit.jl:101
   [8] #s2974#1192 at /home/runner/.julia/packages/Zygote/rv6db/src/compiler/interface2.jl:28 [inlined]
   [9] #s2974#1192(::Any, ::Any, ::Any, ::Any) at ./none:0
   [10] (::Core.GeneratedFunctionStub)(::Any, ::Vararg{Any,N} where N) at ./boot.jl:524
   [11] SqMahalanobis at /home/runner/.julia/packages/Distances/1OMiQ/src/mahalanobis.jl:57 [inlined]
   [12] _pullback(::Zygote.Context, ::Type{SqMahalanobis}, ::Array{Float64,2}) at /home/runner/.julia/packages/Zygote/rv6db/src/compiler/interface2.jl:0
   [13] #232 at /home/runner/work/KernelFunctions.jl/KernelFunctions.jl/test/chainrules.jl:25 [inlined]
   [14] _pullback(::Zygote.Context, ::var"#232#238", ::Array{Array{Float64,N} where N,1}) at /home/runner/.julia/packages/Zygote/rv6db/src/compiler/interface2.jl:0
   [15] _pullback(::Function, ::Array{Array{Float64,N} where N,1}) at /home/runner/.julia/packages/Zygote/rv6db/src/compiler/interface.jl:34
   [16] pullback(::Function, ::Array{Array{Float64,N} where N,1}) at /home/runner/.julia/packages/Zygote/rv6db/src/compiler/interface.jl:40
   [17] gradient(::Function, ::Array{Array{Float64,N} where N,1}) at /home/runner/.julia/packages/Zygote/rv6db/src/compiler/interface.jl:75
   [18] gradient(::Function, ::Val{:Zygote}, ::Array{Array{Float64,N} where N,1}) at /home/runner/work/KernelFunctions.jl/KernelFunctions.jl/test/test_utils.jl:48
   [19] gradient(::Function, ::Symbol, ::Array{Array{Float64,N} where N,1}) at /home/runner/work/KernelFunctions.jl/KernelFunctions.jl/test/test_utils.jl:45
   [20] compare_gradient(::Function, ::Symbol, ::Array{Array{Float64,N} where N,1}) at /home/runner/work/KernelFunctions.jl/KernelFunctions.jl/test/test_utils.jl:73
   [21] top-level scope at /home/runner/work/KernelFunctions.jl/KernelFunctions.jl/test/chainrules.jl:24
   [22] top-level scope at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Test/src/Test.jl:1107
   [23] top-level scope at /home/runner/work/KernelFunctions.jl/KernelFunctions.jl/test/chainrules.jl:2
   [24] include at ./boot.jl:328 [inlined]
   [25] include_relative(::Module, ::String) at ./loading.jl:1105
   [26] include(::Module, ::String) at ./Base.jl:31
   [27] include(::String) at ./client.jl:424
   [28] top-level scope at /home/runner/work/KernelFunctions.jl/KernelFunctions.jl/test/runtests.jl:168
   [29] top-level scope at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Test/src/Test.jl:1107
   [30] top-level scope at /home/runner/work/KernelFunctions.jl/KernelFunctions.jl/test/runtests.jl:61
   [31] include at ./boot.jl:328 [inlined]
   [32] include_relative(::Module, ::String) at ./loading.jl:1105
   [33] include(::Module, ::String) at ./Base.jl:31
   [34] include(::String) at ./client.jl:424
   [35] top-level scope at none:6
   [36] eval(::Module, ::Any) at ./boot.jl:330
   [37] exec_options(::Base.JLOptions) at ./client.jl:263
   [38] _start() at ./client.jl:460

on line

SqMahalanobis(xy[1])(xy[2], xy[3])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions