Releases: JuliaDiff/ChainRulesTestUtils.jl
v1.2.3
ChainRulesTestUtils v1.2.3
Closed issues:
- How to test rules with @not_implemented arguments? (#217)
Merged pull requests:
- Allow NotImplemented tangents for things that have a correct tangent of NoTangent (#218) (@devmotion)
v1.2.2
ChainRulesTestUtils v1.2.2
Closed issues:
Merged pull requests:
v1.2.1
ChainRulesTestUtils v1.2.1
Closed issues:
- 'niceness of priting' test failure on Julia 1 - ubuntu-latest - x64 (#206)
Merged pull requests:
v1.2.0
ChainRulesTestUtils v1.2.0
Merged pull requests:
- don't specialize any functions (#205) (@simeonschaub)
v1.1.0
v1.0.0
ChainRulesTestUtils v1.0.0
Informal release notes.
This is probably breaking for many people.
We have PRed many packages so far preemptively to make sure things have been updated in line with this, but we likely have missed several.
It is now enforced by default that all pullbacks much accept a Thunk
.
There is a kwarg to opt-out of that test, but generally it is better to stick a unthunk
at the start of the pullback.
Or in many cases a PR to ChainRulesCore.jl to add support for a missed linear operator that should automatically unthunk would be best (those are provided for most things, except if it is something like size
which is normally before some other access, in which case it is much more efficient to unthunk
just once).
If using dispatch to unthunk, doing so with local methods causes inference problems due to: JuliaLang/julia#40990
so you will need to move it out of the function defintion, as a global method.
We have removed all the overloads for isapprox
on AbstractTangent subtypes.
They have been deprecated for quite a while now (and probably have been spamming your logs pretty badly).
Instead of @test A≈B
use ChainRulesTestUtils.check_approx(A, B)
.
A notable feature is that we have further improved automatic generation of tangents.
It should now be very rare to need ⊢
or output_tangent
except when you actually want to check it works with something a bit unusual.
Key new improvements are that it uses the ChainRulesCore.ProjectTo
in order to generate natural tangent types for different kinds of arrays.
It is also now much better at converting collections of NoTangent()
into a single NoTangent()
(if you find somewhere it does't please open an issue).
To go with this it is worth remembering (this is unchanged) that ChainRulesTestUtils will always generate a NoTangent()
as the default tangent type for any Integer
.
This is in-contrast to ChainRulesCore.ProjectTo
which will generate a floating point number -- treating integers as being embedded in the floating points.
This assumption allows us to automatically generate the tangents for the indexes in e.g. size(x, i)
or getindex(x, i)
.
However, it does mean if you are testing something then you should use floats if your inputs are differentiable -- which you almost always should be anyway: you can't perturb an integer.
The laws of mathematics are very commendable, but the only law that applies in Australia is the law of Australia,”
— Malcolm Turnbull, 2017-7-14
Closed issues:
- Test all kinds of tangent types (Thunk, ZeroTangent, Tangent{T} etc) (#159)
- remove deprecations for
isapprox
andf/rrule_test
(#164) - Handling Varargs (#185)
Merged pull requests:
- Remove Deprecations. Replace tangent_transforms functionality (#180) (@mzgubic)
- reorder argument order on InplaceableThunk (#188) (@oxinabox)
- Bring back rand_tangent (#189) (@oxinabox)
- bump CRC compat (#190) (@oxinabox)
- Relax requirements on printing for BigFloat (#191) (@oxinabox)
- use ProjectTo for rand_tangent, and also catch some more places we shoud NoTangent (#192) (@oxinabox)
v0.7.13
ChainRulesTestUtils v0.7.13
Merged pull requests:
v0.7.12
ChainRulesTestUtils v0.7.12
Merged pull requests:
v0.7.11
ChainRulesTestUtils v0.7.11
Merged pull requests:
v0.7.10
ChainRulesTestUtils v0.7.10
Merged pull requests: