When running ChainRulesTestUtils.test_frule and ChainRulesTestUtils.test_rrule on the contract function for a TensorNetwork the test fails. Currenly, testing on the contraction for TensorNetworks is disabled.
Example
julia> using Tenet
julia> tn = TensorNetwork([
Tensor(rand(Complex{Float32}, 2, 2), (:y, :z)),
Tensor(rand(Complex{Float32}, 2, 2), (:x, :y)),
Tensor(rand(Complex{Float32}, 2, 2),(:x, :z))
])
TensorNetwork{Arbitrary}(#tensors=3, #inds=3)
julia> rrule(contract, tn)
(fill(-3.8262873f0 + 1.4557784f0im), Tenet.var"#contract_pullback#186"{Arbitrary, TensorNetwork{Arbitrary}}(TensorNetwork{Arbitrary}(#tensors=3, #inds=3)))
julia> test_rrule(contract, tn)
test_rrule: contract on TensorNetwork{Arbitrary}: Error During Test at /home/jofrevalles/.julia/packages/ChainRulesTestUtils/lERVj/src/testers.jl:202
Got exception outside of a @test
UndefRefError: access to undefined reference
Stacktrace:
...
Test Summary: | Error Total Time
test_rrule: contract on TensorNetwork{Arbitrary} | 1 1 0.0s
ERROR: Some tests did not pass: 0 passed, 0 failed, 1 errored, 0 broken.
Summary
When running
ChainRulesTestUtils.test_frule
andChainRulesTestUtils.test_rrule
on thecontract
function for aTensorNetwork
the test fails. Currenly, testing on the contraction forTensorNetwork
s is disabled.Example