-
Notifications
You must be signed in to change notification settings - Fork 17
logabsdet test fix #87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Needs tests. |
right, good to keep the test inside ChainRulesTestUtils and not rely on integration to flag this. I needed to do x->(x, 1.0) because it is important for the backing type of the composite to be different from the differential so that it doesn't |
src/testers.jl
Outdated
return to_composite(jvp(fdm, f2, sigargs...)) | ||
end | ||
|
||
# remove after https://github.com/JuliaDiff/FiniteDifferences.jl/issues/97 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using #TODO
causes it to get picked up by various automated tooling
# remove after https://github.com/JuliaDiff/FiniteDifferences.jl/issues/97 | |
#TODO remove after https://github.com/JuliaDiff/FiniteDifferences.jl/issues/97 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also maybe a comment about this fixing up FiniteDiff sometimes returning Tuples etc rathter than valid diff types as part of that TODO.
to explai what this function does?
src/testers.jl
Outdated
to_composite(x::Tuple) = Composite{typeof(x)}(x...) | ||
to_composite(x::NamedTuple) = Composite{typeof(x)}(;x...) | ||
to_composite(x) = x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since they are not expored
to_composite(x::Tuple) = Composite{typeof(x)}(x...) | |
to_composite(x::NamedTuple) = Composite{typeof(x)}(;x...) | |
to_composite(x) = x | |
_to_composite(x::Tuple) = Composite{typeof(x)}(x...) | |
_to_composite(x::NamedTuple) = Composite{typeof(x)}(;x...) | |
_to_composite(x) = x |
Might want to say:
to_composite(x::Tuple) = Composite{typeof(x)}(x...) | |
to_composite(x::NamedTuple) = Composite{typeof(x)}(;x...) | |
to_composite(x) = x | |
_maybe_as_composite(x::Tuple) = Composite{typeof(x)}(x...) | |
_maybe_as_composite(x::NamedTuple) = Composite{typeof(x)}(;x...) | |
_maybe_as_composite(x) = x |
or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or maybe including fix
in the name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all good suggestions, so added them all
Closes JuliaDiff/ChainRulesCore.jl#266
There were two issues:
;kwargs
causing the wrong method to dispatch