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

Remove automatic extern in isapprox? #7

Closed
nickrobinson251 opened this issue Jan 28, 2020 · 3 comments · Fixed by #57
Closed

Remove automatic extern in isapprox? #7

nickrobinson251 opened this issue Jan 28, 2020 · 3 comments · Fixed by #57

Comments

@nickrobinson251
Copy link
Contributor

This may be the same issue as "do we want extern at all?" (JuliaDiff/ChainRulesCore.jl#56)

But I think if we have it, we may need it to be "smarter" if we're going to have isapprox(a::Differential, b) = isapprox(extern(a), b) as we currently do.

Because we will need to extern(a) (or maybe just unthunk?) the differential type before calling isapprox anyway if a it is not a scalar (e.g. the Zero Matix case in SVD tests: https://github.com/JuliaDiff/ChainRules.jl/blob/8c4985a9a941df165740badfbee83cdf93661742/test/rulesets/LinearAlgebra/factorization.jl#L20-L22)

@nickrobinson251
Copy link
Contributor Author

we also call extern manually before isapprox in frule_test

@nickrobinson251
Copy link
Contributor Author

#20 changes this to only have methods on AbstractThunk and AbstractZeros

@oxinabox
Copy link
Member

oxinabox commented Oct 5, 2020

we also call extern manually before isapprox in frule_test

I am inclined towards this and am infact doing it as part of solving #56 .
because isapprox on thunks gives error messages that don't include the numbers i need to see what is wrong.

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 a pull request may close this issue.

2 participants