Skip to content

Releases: JuliaDiff/ChainRulesTestUtils.jl

v1.2.3

21 Sep 16:53
e3ff6b4
Compare
Choose a tag to compare

ChainRulesTestUtils v1.2.3

Diff since v1.2.2

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

08 Sep 12:34
a46fbbc
Compare
Choose a tag to compare

ChainRulesTestUtils v1.2.2

Diff since v1.2.1

Closed issues:

  • Taking subspaces seriously (#199)
  • Inference tests do not catch problems with thunked inputs (#214)

Merged pull requests:

  • Improve docs on testing AD gradients (#210) (@mzgubic)
  • Catch inference problems for thunked cotangents (#215) (@mzgubic)

v1.2.1

13 Aug 12:36
20db52a
Compare
Choose a tag to compare

ChainRulesTestUtils v1.2.1

Diff since v1.2.0

Closed issues:

  • 'niceness of priting' test failure on Julia 1 - ubuntu-latest - x64 (#206)

Merged pull requests:

  • use digits=5 (not sigdigits) to generate nice random numbers. (#207) (@oxinabox)

v1.2.0

13 Aug 11:03
ae32599
Compare
Choose a tag to compare

ChainRulesTestUtils v1.2.0

Diff since v1.1.0

Merged pull requests:

v1.1.0

06 Aug 12:04
011b4e2
Compare
Choose a tag to compare

ChainRulesTestUtils v1.1.0

Diff since v1.0.0

Closed issues:

  • Should rand_tangent(::Integer) return DoesNotExist() or error? (#197)
  • Should rand_tangent condense arrays of zeros? (#196)

Merged pull requests:

  • Use NoTangent() instead of nothing to designate non-differentiability (#203) (@mzgubic)

v1.0.0

23 Jul 17:52
e0f1171
Compare
Choose a tag to compare

ChainRulesTestUtils v1.0.0

Diff since v0.7.13

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 and f/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

25 Jun 14:08
8b6527a
Compare
Choose a tag to compare

ChainRulesTestUtils v0.7.13

Diff since v0.7.12

Merged pull requests:

v0.7.12

16 Jun 19:40
dffcfff
Compare
Choose a tag to compare

ChainRulesTestUtils v0.7.12

Diff since v0.7.11

Merged pull requests:

v0.7.11

16 Jun 15:53
e21bf34
Compare
Choose a tag to compare

ChainRulesTestUtils v0.7.11

Diff since v0.7.10

Merged pull requests:

v0.7.10

15 Jun 18:32
7b1ef4c
Compare
Choose a tag to compare

ChainRulesTestUtils v0.7.10

Diff since v0.7.9

Merged pull requests: