Skip to content

Diffrax v0.7.0

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 14 Mar 03:52
· 3 commits to main since this release

Features

  • Added diffrax.ClipStepSizeController. This is a wrapper for any stepsize controller, that offers:
    • Clipping steps to particular times;

    • Marking particular times as discontinuities in the vector field;

    • Keeping a buffer of rejected step locations and later stepping back to them exactly. (In particular this is a requirement for adaptive noncommutative SDEs, which was a combination that was not previously supported.)

      (Thanks @andyElking! #484)

  • diffrax.ControlTerm will no longer allow broadcasting of the vector field and the control together. This was previously a major source of bugs for end-users. BREAKING CHANGE (#565, bugs in #228, #560 amongst others.)
  • UnderdampedLangevinDriftTerm(grad_f=...) will now be called as grad_f(y, args) using the provided diffeqsolve(..., args=...) rather than with just grad_f(y). BREAKING CHANGE. (Thanks @ricor07! #542, #547)
  • Stochastic Runge-Kutta methods now support forward-mode autodiff. (#561)

Bugfixes

  • Fixed crash if the solve's vector field cannot even be valuated at time 0 (Thanks @FloList! #566)
  • Fixed crash of the form NotImplementedError: Differentiation rule for 'reduce_or' not implemented when using particular combinations of JAX/Diffrax versions. (Thanks @LuggiStruggi! #568, #578)

Other

  • Many many docs improvements (Thanks @johannahaffner, @lockwo, @danielward27! #554, #555, #571)
  • Improves error messages for mismatched terms. (#562)
  • Dropped dependency on typeguard. (Thanks @qodfathr! #588)
  • diffrax.WeaklyDiagonalControlTerm has been moved from a class to a function. (Just as a backward-compatibility shim.) It has been deprecated in favour of using diffrax.ControlTerm + lineax.DiagonalLinearOperator for a while.
  • Tidied up the order of arguments to diffrax.PIDController. Hopefully no-one was passing that many positionally, rather than by keyword, anyway. BREAKING CHANGE

New Contributors

Full Changelog: v0.6.2...v0.7.0