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

ChainRulesCore v1.15.4 seems to have broken ChainRules #586

Closed
rofinn opened this issue Sep 13, 2022 · 2 comments
Closed

ChainRulesCore v1.15.4 seems to have broken ChainRules #586

rofinn opened this issue Sep 13, 2022 · 2 comments

Comments

@rofinn
Copy link

rofinn commented Sep 13, 2022

ChainRules.jl has been failing on nightly for over a week with this error.

https://github.com/JuliaDiff/ChainRules.jl/actions/runs/2997486854/jobs/4809084508#step:6:164

test_rrule: ComposedFunction{typeof(copy), typeof(broadcasted)}(copy, Base.Broadcast.broadcasted) on Base.Broadcast.Style{Tuple},typeof(log),Float64,Float64,Float64: Error During Test at /home/runner/.julia/packages/ChainRulesTestUtils/YbVdW/src/testers.jl:193

I reran the tests pinning ChainRulesCore to 1.15.3 and the tests seem to be passing now. It isn't immediately obvious from the error or the diff between those two release as to what would have broken. Maybe something in the tests just need to be updated?

v1.15.3...v1.15.4

@mcabbott
Copy link
Member

mcabbott commented Sep 13, 2022

The failure is this, surely caused by #565:

julia> using ChainRules, ChainRulesCore, ChainRulesTestUtils
julia> using Base.Broadcast: broadcasted
julia> BT1 = Broadcast.BroadcastStyle(Tuple);

julia> test_rrule(copybroadcasted, BT1, log, Tuple(rand(3) .+ 1))
test_rrule: copy  Base.Broadcast.broadcasted on Base.Broadcast.Style{Tuple},typeof(log),Float64,Float64,Float64: Error During Test at /Users/me/.julia/packages/ChainRulesTestUtils/YbVdW/src/testers.jl:193
  Got exception outside of a @test
  return type Tuple{NoTangent, NoTangent, NoTangent, Tangent{Tuple{Float64, Float64, Float64}, Tuple{Float64, Float64, Float64}}} does not match inferred return type Tuple{NoTangent, NoTangent, NoTangent, Union{NoTangent, Tangent{Tuple{Float64, Float64, Float64}, Tuple{Float64, Float64, Float64}}}}
  Stacktrace:
    [1] error(s::String)
      @ Base ./error.jl:35
    [2] _test_inferred(f::Any, args::Any; kwargs::Base.Pairs{Symbol, V, Tuple{Vararg{Symbol, N}}, NamedTuple{names, T}} where {V, N, names, T<:Tuple{Vararg{Any, N}}})
      @ ChainRulesTestUtils ~/.julia/packages/ChainRulesTestUtils/YbVdW/src/testers.jl:255

@rofinn
Copy link
Author

rofinn commented Sep 14, 2022

Thanks for pointing me in the right direction. I'll close this since updating that particular test was the easiest option.

@rofinn rofinn closed this as completed Sep 14, 2022
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