JuliaDiff / JuliaDiff/Diffractor.jl

frule_via_ad tries to call NoTangent

Open
#277 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Julia
Stars
453
Forks
33
PR merge metrics
No merged PRs in 30d

Description

julia> using ChainRulesCore, Diffractor

julia> ChainRulesCore.frule_via_ad(Diffractor.DiffractorRuleConfig(), (NoTangent(), 1), exp, 1)
ERROR: MethodError: objects of type NoTangent are not callable
Stacktrace:
 [1] ∂☆nomethd(args::Any)
   @ Diffractor ~/.julia/packages/Diffractor/v1WuP/src/stage1/recurse_fwd.jl:66
 [2] macro expansion
   @ ~/.julia/packages/Diffractor/v1WuP/src/stage1/recurse_fwd.jl:0 [inlined]
 [3] (::Diffractor.∂☆recurse{…})(::Diffractor.TangentBundle{…}, ::Diffractor.TangentBundle{…})
   @ Diffractor ~/.julia/packages/Diffractor/v1WuP/src/stage1/recurse_fwd.jl:103
 [4] (::Diffractor.∂☆internal{…})(::Diffractor.TangentBundle{…}, ::Vararg{…})
   @ Diffractor ~/.julia/packages/Diffractor/v1WuP/src/stage1/forward.jl:114
 [5] frule_via_ad(::Diffractor.DiffractorRuleConfig, ::Tuple{NoTangent, Int64}, ::Function, ::Vararg{Any})
   @ Diffractor ~/.julia/packages/Diffractor/v1WuP/src/stage1/forward.jl:130
 [6] top-level scope
   @ ~/Work/GitHub/Julia/DifferentiationInterface.jl/test/diffractor.jl:18
Some type information was truncated. Use `show(err)` to see complete types.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the example with ChainRulesCore.frule_via_ad and Diffractor.DiffractorRuleConfig. Start in src/stage1/recurse_fwd.jl at line 66, then trace the call from src/stage1/forward.jl around lines 114 and 130. Done means the shown NoTangent input no longer produces a MethodError from calling NoTangent.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.