Zygote.jl icon indicating copy to clipboard operation
Zygote.jl copied to clipboard

Add devdocs for important internal functions

Open ToucheSir opened this issue 2 years ago • 2 comments

These may be as simple as a couple lines of comments, but as noted in https://github.com/FluxML/Zygote.jl/issues/1243#issuecomment-1200400917 they would be good to have:

  • [ ] accum
  • [ ] accum_param
  • [ ] literal_{get|set}{property|field|index}
  • [ ] _pullback and its many variations
  • [ ] gradcheck
  • [ ] All of https://github.com/FluxML/Zygote.jl/blob/master/src/compiler/emit.jl
  • [ ] All macros in https://github.com/FluxML/Zygote.jl/blob/master/src/compiler/interface.jl
  • [ ] pullback (how is this not documented already?...)
  • [ ] Pullback
  • [ ] All of https://github.com/FluxML/Zygote.jl/blob/master/src/compiler/reverse.jl

ToucheSir avatar Jul 31 '22 16:07 ToucheSir

One more shower thought kinda proposal:

A PR checklist template (you know, the standard "[] Tests have been added" etc.) with a bullet saying something like "[] Every (undocumented) piece of code which took me more than five minutes to understand has a comment with the understanding I gained". Maybe a silly idea, I don't know...

DrChainsaw avatar Jul 31 '22 21:07 DrChainsaw

A checklist is a good idea and one we should've had for a while. Copied over Flux's in #1275 with a small admonition to document changes to existing functionality as well.

ToucheSir avatar Jul 31 '22 22:07 ToucheSir