Skip to content
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

Use NoTangent() instead of nothing to designate non-differentiability #203

Merged
merged 4 commits into from
Aug 6, 2021

Conversation

mzgubic
Copy link
Member

@mzgubic mzgubic commented Aug 5, 2021

Needed so that JuliaDiff/FiniteDifferences.jl#189 does not break ChainRules tests

Copy link
Member

@AlexRobson AlexRobson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is changing the length of the return - i.e. from (nothing, nothing...) to a single NoTangent(). Is this intended?

I'm surprised no tests had to change to handle this.

I think that this means that here given that the output of fd_cotangents) will only be length one, the zip will only loop over the first argument.

@mzgubic
Copy link
Member Author

mzgubic commented Aug 6, 2021

well caught, that's a mistake

@codecov-commenter
Copy link

Codecov Report

Merging #203 (be9dbdb) into master (e0f1171) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #203   +/-   ##
=======================================
  Coverage   90.94%   90.94%           
=======================================
  Files          11       11           
  Lines         287      287           
=======================================
  Hits          261      261           
  Misses         26       26           
Impacted Files Coverage Δ
src/finite_difference_calls.jl 96.96% <100.00%> (ø)
src/testers.jl 92.85% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e0f1171...be9dbdb. Read the comment docs.

Copy link
Member

@willtebbutt willtebbutt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no objection to this going in, but like @AlexRobson I'm a bit surprised that there's no changes needed to the tests. Do we just not have great coverage in this package?

@mzgubic
Copy link
Member Author

mzgubic commented Aug 6, 2021

I think the reason is that this is an implementation detail. It is not visible anywhere outside of the package. Annoyingly it didn't catch the length issue.

@mzgubic mzgubic merged commit 011b4e2 into master Aug 6, 2021
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.

4 participants