FluxML / ZygoteRules.jl

MIT License
15 stars 13 forks source link

Collapse tuples of `nothing` #26

Closed devmotion closed 9 months ago

devmotion commented 1 year ago

Zygote uses the convention that tuples of nothing are collapsed to a single nothing. However, currently this convention is not applied to @adjoints. The PR fixes this, as suggested in https://github.com/FluxML/Zygote.jl/issues/1464#issuecomment-1760809337.

ToucheSir commented 1 year ago

Thanks! Since most of the tests are on the Zygote side, I've opened https://github.com/FluxML/Zygote.jl/pull/1466 with a copy of these changes to see what CI thinks. If everything looks good, will merge this.

devmotion commented 1 year ago

Would be useful to add downstream tests with at least Zygote to this repo IMO.

roflmaostc commented 10 months ago

Can this be merged? I encountered a similar error but not sure...

ToucheSir commented 10 months ago

See https://github.com/FluxML/Zygote.jl/pull/1466#issuecomment-1780649701. We need to do some tests on the user-facing interface in Zygote, then this can be merged. I haven't decided whether it should be a breaking change or not.