Skip to content

Diffrax v0.7.1

Choose a tag to compare

@github-actions github-actions released this 01 Feb 17:17
· 17 commits to main since this release

Phew, long time between releases! I hope this is what stable software looks like. This release is mostly lots of edge-case bugfixes.

Features

  • SaveAt(steps=<int>) can now be used to save every nth step. Setting this to True (the previous behaviour) still corresponds to saving every step. (Thanks @alessandrofasse! #625, #626)
  • Events can now be triggered based on the direction of crossing zero. (Thanks @LuggiStruggi #640, #655)
    • Recall that we have boolean events (an f(y) that terminates the solve at the end of a step once it becomes true) and continuous events (an f(y) that triggers when f(y) = 0, and we do a root-find to get the exact y for which equality holds).
    • Specifically, continuous events can now be set to trigger if zero is reached from above, from below, or from either side (the current default).

Bugfixes

  • v0.7.0 had massively slowed down compilation speeds. This is now fixed. (Thanks @HeSchatz! #606, #618)
  • Fixed PIDController(..., jump_ts=...), PIDController(..., step_ts=...) and ClipStepSizeController(...) to correctly be treated as adaptive step size controllers. This was particularly important when used with implicit solvers, which would otherwise complain that they need to be paired with an adaptive step size controller. (Thanks @terhorst! #607, #608, #723)
  • Fixed diffrax.ALIGN to correctly be considered an adaptive step size controller. (Thanks @lockwo! #670, #674)
  • Fixed a crash that occurred in serialization/distributed scenarios, by replacing is jnp.dtype(bool) with == jnp.dtype(bool). (Thanks @ArianAmani! #678, #679)
  • Fixed very small timesteps, or very small time intervals, getting undesirably clipped for numerical stability reasons. (Thanks @jpbrodrick89, @varchasgopalaswamy, @aidancrilly! #632, #657, #660, #666. As part of this note that the evolving state for ConstantStepSize has changed. Though as the structure of these states is not considered public then this is not considered a breaking change.)
  • Fixed numerical stability issues sometimes leading to infinite loops when using PIDController(dt_min=..., force_dtmin=True). (Thanks @philipwijesinghe! #703, #704)
  • Fixed wrong solve behaviour if the t0 of diffeqsolve(t0=...) was exactly 1 ULP before a jump time (ClipStepSizeController(..., jump_ts=...) or PIDController(jump_ts=...)). (Thanks @FFroehlich! #713, #714)
  • Fixed wrong output when a boolean event is provided, and a root finder is provided, and the boolean event triggers on the first step. (Thanks @BSnelling! #720, #724)

Misc

New Contributors

Full Changelog: v0.7.0...v0.7.1