Skip to content

Commit 2df22ea

Browse files
committed
update global configuration, removing enable_tangent_transform
1 parent 3dede2a commit 2df22ea

File tree

2 files changed

+1
-27
lines changed

2 files changed

+1
-27
lines changed

src/ChainRulesTestUtils.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ using LinearAlgebra
99
using Random
1010
using Test
1111

12-
const _fdm = central_fdm(5, 1; max_range=1e-2)
13-
const TEST_INFERRED = Ref(true)
14-
const TRANSFORMS_TO_ALT_TANGENTS = Function[x -> @thunk(x)] # e.g. [x -> @thunk(x), _ -> ZeroTangent(), x -> rebasis(x)]
15-
1612
export TestIterator
1713
export test_approx, test_scalar, test_frule, test_rrule, generate_well_conditioned_matrix
1814
export , rand_tangent

src/global_config.jl

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,6 @@
11
const _fdm = central_fdm(5, 1; max_range=1e-2)
22
const TEST_INFERRED = Ref(true)
3-
const TRANSFORMS_TO_ALT_TANGENTS = Function[] # e.g. [x -> @thunk(x), _ -> ZeroTangent(), x -> rebasis(x)]
4-
5-
"""
6-
enable_tangent_transform!(Thunk)
7-
8-
Adds a alt-tangent tranform to the list of default `tangent_transforms` for
9-
[`test_frule`](@ref) and [`test_rrule`](@ref) to test.
10-
This list of defaults is overwritten by the `tangent_transforms` keyword argument.
11-
12-
!!! info "Transitional Feature"
13-
ChainRulesCore v1.0 will require that all well-behaved rules work for a variety of
14-
tangent representations. In turn, the corresponding release of ChainRulesTestUtils will
15-
test all the different tangent representations by default.
16-
At that stage `enable_tangent_transform!(Thunk)` will have no effect, as it will already
17-
be enabled.
18-
We provide this configuration as a transitional feature to help migrate your packages
19-
one feature at a time, prior to the breaking release of ChainRulesTestUtils that will
20-
enforce it.
21-
"""
22-
function enable_tangent_transform!(::Type{Thunk})
23-
push!(TRANSFORMS_TO_ALT_TANGENTS, x->@thunk(x))
24-
unique!(TRANSFORMS_TO_ALT_TANGENTS)
25-
end
3+
const TRANSFORMS_TO_ALT_TANGENTS = Function[x->@thunk(x)] # e.g. [_ -> ZeroTangent(), x -> rebasis(x)]
264

275
"sets up TEST_INFERRED based ion enviroment variables"
286
function init_test_inferred_setting!()

0 commit comments

Comments
 (0)