Missing dispatch for `prepare_pullback_aux`?
Vaibhavdixit02 opened this issue · comments
Vaibhav Kumar Dixit commented
In my testing currently, FastDifferentitation backend throws
ERROR: MethodError: no method matching prepare_pullback_aux(::OptimizationDIExt.var"#28#40"{…}, ::AutoFastDifferentiation, ::Vector{…}, ::DifferentiationInterface.PullbackFast)
Closest candidates are:
prepare_pullback_aux(::Any, ::Any, ::Any, ::Any, ::DifferentiationInterface.PullbackSlow)
@ DifferentiationInterface ~/.julia/packages/DifferentiationInterface/6jgZI/src/pullback.jl:34
prepare_pullback_aux(::Any, ::Any, ::Any, ::DifferentiationInterface.PullbackSlow)
@ DifferentiationInterface ~/.julia/packages/DifferentiationInterface/6jgZI/src/pullback.jl:30
Stacktrace:
[1] prepare_pullback(f::Function, backend::AutoFastDifferentiation, x::Vector{Float64})
@ DifferentiationInterface ~/.julia/packages/DifferentiationInterface/6jgZI/src/pullback.jl:23
[2] prepare_gradient(f::Function, backend::AutoFastDifferentiation, x::Vector{Float64})
@ DifferentiationInterface ~/.julia/packages/DifferentiationInterface/6jgZI/src/gradient.jl:22
(this is prepare_gradient
call)
Guillaume Dalle commented
I presumably missed a spot somewhere when I deactivated pullbacks for FastDifferentiation.
Once #131 is fixed I can reactivate them, in the meantime this particular bug will be fixed on main in an hour or so
Guillaume Dalle commented
Can you give me a fuller code example? It's weird this doesn't get caught in tests
Guillaume Dalle commented
Yeah I cannot reproduce, gonna need a more detailed example
julia> using DifferentiationInterface
julia> import FastDifferentiation
julia> prepare_gradient(sum, AutoFastDifferentiation(), [1.0]); # this works
Guillaume Dalle commented
Closing, if you have a MWE feel free to open a new issue