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

Some examples of failing test_rrule for *(::AbstractMatrix, ::AbstractMatrix) #474

Closed
AlexRobson opened this issue Jul 22, 2021 · 1 comment

Comments

@AlexRobson
Copy link
Member

AlexRobson commented Jul 22, 2021

  • This is on effectively 1.00-dev for ChainRulesCore
  • These are on ChainRules v1.0.1, ChainRulesCore v1.0.2, ChainRulesTestUtils v1.0.0

test_rrule(*, UpperTriangular(rand(4,4)), Diagonal(rand(4,); check_inferred = false)
test_rrule(*, LowerTriangular(rand(4,4)), Diagonal(rand(4,)); check_inferred = false)
test_rrule(, Symmetric(rand(4,4)), Diagonal(rand(4,))) # Fails with approximation error
test_rrule(
, Diagonal(rand(4,)), Symmetric(rand(4,4))) # Fails with approximation error
test_rrule(*, Diagonal(rand(4,)), Diagonal(rand(4,)))
test_rrule(, Bidiagonal(rand(4,), rand(3,), :U), Diagonal(rand(4,))) # Expected A struct type (FiniteDifferences)
test_rrule(
, 5, rand(4,4)) # Expression: ad_cotangent isa NoTangent Evaluated: Thunk(Ch....
test_rrule(*, 5.0, Diagonal(rand(4,))

test_rrule(, Matrix(rand(4,4)), Diagonal(rand(4,))) # Passes
test_rrule(
, Diagonal(rand(4,)), Matrix(rand(4,4))) # Passes
test_rrule(*, UpperTriangular(rand(4,4)), Matrix(rand(4,4))) # Passes

All of these appear to involve matrix types that are a compact representation on the LHS and so probably related to densification during testing and possibly interaction with to_Vec in FiniteDifferences.

EDIT: Strikethrough the ones now passing.

@AlexRobson AlexRobson changed the title Some examples of failing rrules *(::AbstractMatrix, ::AbstractMatrix) Some examples of failing test_rrule for *(::AbstractMatrix, ::AbstractMatrix) Jul 22, 2021
@mzgubic
Copy link
Member

mzgubic commented Jul 27, 2021

Most of these were fixed by a combination of #478 and JuliaDiff/ChainRulesTestUtils.jl#192.

The approximation error ones remain however - I think they are related to JuliaDiff/FiniteDifferences.jl#164

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

No branches or pull requests

2 participants