JuliaDiff / JuliaDiff/ChainRulesCore.jl
Function to tell if you are being differentiated
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 267
- Forks
- 66
- PR merge metrics
- No merged PRs in 30d
Description
Quite a few packages define a function to tell whether they are inside AD, as of https://github.com/FluxML/Flux.jl/pull/1863/files#r806287154 Flux has:
istraining() = false
# @adjoint istraining() = true, _ -> nothing
ChainRulesCore.rrule(::typeof(istraining)) = true, _ -> (NoTangent(),)
Maybe CRC should provide one?
It could be true/false. It could also be Val(true), or it could something more elaborate like:
order() = (fwd=0, rev=0, total=0)
What thoughts?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the Flux.jl pull request linked in the issue and the existing conventions for detecting automatic differentiation. The proposal does not name implementation files or tests, and its semantics are unresolved; first settle whether the API should report a boolean, a Val, or derivative-order information before defining what done means.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100