JuliaDiff / JuliaDiff/ChainRulesCore.jl
Teach Tangent{T} about NoTangent vs ZeroTangent?
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 267
- Forks
- 66
- PR merge metrics
- No merged PRs in 30d
Description
Right now canonicalizing at Tangent{T} inserts ZeroTangent for all fields of the T that don't have explict tangents recorded.
As does getproperty.
This is correct in that they don't have anything recorded as they don't get used to determine the output -- which is what ZeroTangent represents.
But it is also true for if the primal field is Char or Bool or Int or Symbol etc that they don't have a tangent space at all so NoTangent is also correct, and kinda more expected.
We can't always get it right just from the primal type, since it could be a indicator float etc.
But we can probably do pretty well
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 reading canonicalizing at Tangent{T} and the related getproperty behavior. Determine how to distinguish fields such as Char, Bool, Int, and Symbol, while preserving cases where the primal type may still have a tangent space; done means both paths return the appropriate NoTangent or ZeroTangent representation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100