-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Make work on functors #170
Conversation
src/testers.jl
Outdated
if accumulated_x̄ isa Union{Nothing,NoTangent} # then we marked this argument as not differentiable # TODO remove once #113 | ||
@assert x̄_fd === nothing # this is how `_make_j′vp_call` works | ||
x̄_ad isa ZeroTangent && error( | ||
fd_cotangents = _make_j′vp_call(fdm, (f, xs...) -> f(xs...; fkwargs...), ȳ, (f, xs...), is_ignored) |
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.
This is the main change, i.e. from
(xs...) -> f(xs...; fkwargs...)
to
(f, xs...) -> f(xs...; fkwargs...)
making the f
an argument. The rest of the changes are adding an extra cotangent for f
via rand_tangent
, and renaming the variables from x̄_something
to something_cotangent
since it also includes f̄
No clue why the Documentation test fails, and I can't reproduce it locally even though the Julia version, Documenter version, and ChainRulesCore/TestUtils versions are all the same. |
Hack to solve this. We kinda want to do that anyway. If you need to get this merged can change that bit of the docs to be a
block rather than a
block. Else can make another PR to do that stuff, and then rebase this on top of it. Your call |
The problem is that I can't find the place where I should make the change.😬 The doctest that is meant to be failing does not exist explicitly in the code anywhere (not in CRTU, or CRC, or CR). It looks like it was generated from The failure of the doctest is that the stacktrace is coming from a different line. So it looks like it is picking up some doctest that is itself using a different version of ChainRulesTestUtils (probably master?). I wonder whether we can just try merging an see if it works? |
Oh, sorry, looks like that's the doctest I introduced in #165 that's failing. I wouldn't recommend merging this before manually merging master into this branch. The failure is most likely real, because I couldn't figure out how to not make the error output I wanted to show not print the location of the testset in |
Alternatively could you Documenters Filter functionality to ignore the line number info |
Oh, thanks! This was driving me crazy. I am still confused though - I thought CI runs on my branch? I haven't merged your changes. So it appears at least the Documenter action is running on what master would look like if this would have been merged? How does it deal with conflicts? 😬 How d...wh...? !??!? 😂 |
Closes #117
To do:
rand_tangent
forf
when testing constructors, i.e.rand_tangent(Foo)
test_frule
for functorstest_scalar
for functors_ensure_not_running_on_functor