From 2f906fddb18839da1adcdcad0ef59aaacbd30468 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20S=C3=A1nchez=20Ram=C3=ADrez?= Date: Tue, 12 Sep 2023 16:01:15 +0200 Subject: [PATCH] Remove legacy `ChainRulesCore` tests --- test/integration/ChainRules_test.jl | 36 ----------------------------- 1 file changed, 36 deletions(-) delete mode 100644 test/integration/ChainRules_test.jl diff --git a/test/integration/ChainRules_test.jl b/test/integration/ChainRules_test.jl deleted file mode 100644 index d35f5a23d..000000000 --- a/test/integration/ChainRules_test.jl +++ /dev/null @@ -1,36 +0,0 @@ -@testset "ChainRules" begin - using Tenet: Tensor, contract - using Random - - using ChainRulesTestUtils - - using ChainRulesCore - function ChainRulesTestUtils.rand_tangent(rng::AbstractRNG, x::TensorNetwork) - return ProjectTo(x)( - TensorNetwork([ProjectTo(tensor)(rand_tangent.(Ref(rng), tensor)) for tensor in tensors(x)]), - ) - end - - @testset "contract" begin - @testset "TensorNetwork" begin - tn = rand(TensorNetwork, 2, 3) - - @test frule((nothing, tn), contract, tn) isa Tuple{Tensor{eltype(tn),0},Tensor{eltype(tn),0}} - @test rrule(contract, tn) isa Tuple{Tensor{eltype(tn),0},Function} - - # TODO FiniteDifferences crashes - # test_frule(contract, tn) - # test_rrule(contract, tn) - end - end - - @testset "replace" begin - using UUIDs: uuid4 - - tn = rand(TensorNetwork, 10, 3) - mapping = [label => Symbol(uuid4()) for label in inds(tn)] - - # TODO fails in check_result.jl@161 -> `c_actual = collect(Broadcast.materialize(actual))` - # test_rrule(replace, tn, mapping...) - end -end