JuliaDiff / JuliaDiff/ChainRulesCore.jl
Composite clarification
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 267
- Forks
- 66
- PR merge metrics
- No merged PRs in 30d
Description
The docs say that Composite users should disregard the T parameter as it is an implementation detail.
However both ChainRules and Zygote do not always follow this recommendation.
There is a difference between the two constructors and it is not clear when to apply which one. Perhaps a comment could be added to the docs?
julia> xt = (1, 2)
(1, 2)
julia> ct1 = Composite{Any, typeof(xt)}(xt)
Composite{Any}(1, 2)
julia> ct2 = Composite{Any}(xt)
Composite{Any}((1, 2),)
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 with the Composite section in the linked ChainRulesCore API documentation, then compare the two constructor examples with the usages in ChainRules' evalpoly.jl and Zygote's compiler/chainrules.jl. Done means the documentation clearly explains when each constructor form should be used and how the T parameter relates to that choice.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100