Skip to content

Need mode method for SecondOrder #204

@ElOceanografo

Description

@ElOceanografo

I was trying to compare some second-order methods for Hessians using DifferentiationInterfaceTest, but found there is no mode method defined for SecondOrder backends:

julia> DifferentiationInterface.mode(SecondOrder(AutoSparseForwardDiff(), AutoReverseDiff()))
ERROR: MethodError: no method matching mode(::SecondOrder{AutoSparseForwardDiff{nothing, Nothing}, AutoReverseDiff})

Closest candidates are:
  mode(::AutoChainRules{<:ChainRulesCore.RuleConfig{>:ChainRulesCore.HasReverseMode}})
   @ DifferentiationInterfaceChainRulesCoreExt ~/.julia/packages/DifferentiationInterface/9POaB/ext/DifferentiationInterfaceChainRulesCoreExt/DifferentiationInterfaceChainRulesCoreExt.jl:17
  mode(::AutoChainRules{<:ChainRulesCore.RuleConfig{>:ChainRulesCore.HasForwardsMode}})
   @ DifferentiationInterfaceChainRulesCoreExt ~/.julia/packages/DifferentiationInterface/9POaB/ext/DifferentiationInterfaceChainRulesCoreExt/DifferentiationInterfaceChainRulesCoreExt.jl:16
  mode(::Union{AutoSparseFiniteDiff, AutoSparseZygote, AutoSparseFastDifferentiation, AutoSparseSymbolics, AutoSparseReverseDiff, AutoSparseForwardDiff, AutoSparsePolyesterForwardDiff})
   @ DifferentiationInterface ~/.julia/packages/DifferentiationInterface/9POaB/src/sparse.jl:37
  ...

Stacktrace:
 [1] top-level scope
   @ REPL[5]:1

...which causes an error when creating the table of benchmark results.

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