Skip to content

Conversation

ToucheSir
Copy link
Member

@ToucheSir ToucheSir commented Jan 12, 2024

Companion to FluxML/ZygoteRules.jl#26. After some discussion in #1466 and elsewhere, we decided preserving the Tuple return was the way to go.

PR Checklist

  • Tests are added
  • Documentation, if applicable

@ToucheSir
Copy link
Member Author

Well, I didn't expect downstream tests to fare so well. Also only minimal changes to Zygote's own test suite required.

Rough next steps:

  1. Cut a ZygoteRules release with Collapse tuples of nothing ZygoteRules.jl#26. I'm on the fence about whether to mark it as breaking right now, thoughts and opinions very much welcome.
  2. Update this PR to use the new ZygoteRules and tweak doc(string)s to mention this guarantee about gradients return type.
  3. Merge this and start working on newly unblocked PRs like Remove redundant sum() rules #1453 and Allow ChainRules zero types internally #1389.

Also adds a docstring for `pullback`,
which we've been missing for some time.
@ToucheSir
Copy link
Member Author

Docs are up so this should be ready. Amazingly, we never had a docstring for pullback despite referencing it in other parts of the docs!

@ToucheSir ToucheSir merged commit 54f1e80 into master Jan 17, 2024
@ToucheSir ToucheSir deleted the bc/gradtuple branch January 17, 2024 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants