Merged
Conversation
ToucheSir
approved these changes
Nov 14, 2022
Member
ToucheSir
left a comment
There was a problem hiding this comment.
LGTM. Slightly off topic, is there a way to add an org-wide breaking label so we can track what goes into such releases? And/or maybe we should use milestones?
Member
Author
|
Could do milestones. Flux seems messy enough that they help, perhaps this is simple enough not to? |
Member
Author
|
This breaks the following use, which relies on Tangent overloading julia> using ChainRulesCore
julia> x = (a = 1,);
julia> gx = ProjectTo(x)((a=0.1,))
Tangent{NamedTuple{(:a,), Tuple{Int64}}}(a = 0.1,)
julia> gx.a
0.1
julia> functor(typeof(x), gx)
ERROR: type Tangent has no field aI think that means we should revert it. It will break Optimisers + non-Zygote completely. |
mcabbott
added a commit
to mcabbott/Functors.jl
that referenced
this pull request
Nov 15, 2022
This reverts commit 75fef99.
mcabbott
added a commit
that referenced
this pull request
Nov 16, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #46
Is this going to have any surprising consequences?
Note that
@functorcannot go the other way, and usegetproperty/propertynamesfor everything, as that needs an instance not the type.(Could add tests but they'd be kind-of contrived, I mean all existing tests check that this runs, new ones would only check against someone editing these lines back to
getproperty.)