Skip to content

Releases: patrick-kidger/lineax

lineax v0.1.0

27 Jan 21:17

Choose a tag to compare

Phew, it's been a while since a release! It's about time we got something out.

Breaking changes

  • AbstractLinearSolver.allow_dependent_{rows, columns} have been removed in favour of the simpler AbstractLinearSolver.assume_full_rank. (Thanks @adconner! In particular for being so patient with me and my bugs 😅 #158)

Features

  • Added the lineax.LSMR solver. This is a solver that will return the pseudoinverse (like lineax.SVD) solution, and handles nonsquare/singular matrices. In addition, it is an iterative solver. (Thanks @f0uriest @PTNobel @healeyq3 @johannahaffner! #86)
  • Added the lineax.Normal solver. This wraps another existing solver so that it operates via the normal equations. (Thanks @adconner! #159)

Compatibility

  • Now compatible with modern JAX (at least 0.8.2), which was newly promoting some static values to tracers. (#183, #187, #188)

Bugfixes

  • Preconditioned Krylov solvers now also use the preconditioner on the backward pass, instead of no preconditioner. (Thanks @f0uriest! #162)

Performance

New Contributors

Full Changelog: v0.0.8...v0.1.0

Lineax v0.0.8

27 Mar 17:38

Choose a tag to compare

  • Calling linear solves with nonfinite (NaN or inf) inputs are now detected with a separate error. Previously just the output of the linear solve was checked for being nonfinite. (Thanks @johannahaffner! #130)
  • lineax.DiagonalLinearOperator now supports pytree-valued diagonals. Previously just array-valued diagonals were supported. (Thanks @johannahaffner! #124, #125)
  • Iterative solvers now support running with just a fixed number of steps, with no tolerance e.g. GMRES(rtol=0.0, atol=0.0, max_steps=5). (Thanks @Ceyron! #129)
  • Shiny new documentation!

Finally, not a change but a huge shout-out to @johannahaffner for figuring out a very tricky issue with JAX 0.5.3 introducing a segfault in our tests. (#140, jax-ml/jax#27201)

New Contributors

Full Changelog: v0.0.7...v0.0.8

Lineax v0.0.7

21 Oct 10:54

Choose a tag to compare

This is a bugfix release.

  • Diagonal solver now works with different input+output structures (#111)

Full Changelog: v0.0.6...v0.0.7

Lineax v0.0.6

29 Sep 23:41

Choose a tag to compare

This is mostly a bugfix release.

  • Crash fix for JAX introducing a breaking change in 0.4.32+ with jax.ShapeDtypeStruct.weak_dtype. (#110)
  • Crash fix for a very long standing JAX bug jax-ml/jax#22011 (we finally tracked this one down, hurrah), by registering a transpose rule for stop_gradient. This one has turned up very occasionally in complicated uses of Lineax like delay-differential equation solvers. (Thanks @dkweiss31! #100)
  • Bugfix for complex numbers: IdentityLinearOperator.as_matrix now returns the correct dtype -- previously it was always the floating-point default. (Thanks @Randl! #103)
  • Bugfix for complex numbers: ollow conjugation convention in tree_dot. (Thanks @Randl! #105)
  • Improvement: 1x1 linear operators are now treated as diagonal. (Thanks @NeilGirdhar! #106)

New Contributors

Full Changelog: v0.0.5...v0.0.6

Lineax v0.0.5

14 Apr 17:20

Choose a tag to compare

Features

  • Added full complex support to the whole library! A huge thanks goes out to @Randl, who has been tirelessly pushing this all the way through. At this point Lineax should now support complex numbers across all of its interfaces. (#64, #89, #90, #91, #92, #93)
  • Added a flag to lx.JacobianLinearOperator for whether to use jacfwd or jacrev. (Thanks @thibmonsel! #75)

Bugfixes

  • grad-of-vmap-of-<lx.linear_solve with only some outputs used> will no longer crash during tracing. (#84)
  • Fixed the runtime lineax.__version__ being pinned to 0.0.1.

New Contributors

Full Changelog: v0.0.4...v0.0.5

Lineax v0.0.4

19 Dec 16:55

Choose a tag to compare

We now have a paper on arXiv!

Features

  • Experimental support for complex numbers. (Thanks @Randl!) These probably aren't 100% bug-free yet, but most of the work has now been done. Please report any issues!
    • Added lineax.conj which computes the conjugate of an operator. (E.g. for a matrix A, it returns A-bar.)
    • Added lineax.AbstractLinearSolver.conj, which conjugates the result of lineax.AbstractLinearSolver.init.
    • Both of the above should be implemented when adding a new operator a new solver respectively.

Bugfixes

  • Fixed PyTreeLinearOperator.as_matrix returning the wrong output if the pytree was of zero size.
  • Added lineax.internal.{max_norm, rms_norm, two_norm, sum_squares, tree_dot, default_floating_dtype}. (Being in the internal namespace means that these are undocumented/experimental, and may move somewhere else in the future.)

Internal changes

Now using ruff-format!

New Contributors

  • @Randl made their first contribution in #59

Full Changelog: v0.0.3...v0.0.4

Lineax v0.0.3

13 Oct 02:30

Choose a tag to compare

This is a minor bugfix release.

  • Fixed a crash when differentiating lineax.linear_solve but leaving some outputs unused. (Specifically, when we get symbolic zero cotangents.) (#49)
  • Fixed a crash when using pytrees with lineax.CG. (#49)
  • Several fixes for lineax.IdentityLinearOperator with different input/output structures. (#50)

Full Changelog: v0.0.2...v0.0.3

Lineax v0.0.2

30 Sep 02:16

Choose a tag to compare

Minor release, just tweaking a few things.

  • Fixed all the warnings that get printed out using Lineax v0.0.1 with Equinox v0.11.0. (Equinox is correctly shouting at us that we screwed up by defining both __init__ and __post_init__.)
  • IdentityLinearOperator(structure) is now IdentityLinearOperator(input_structure, output_structure), to support differing input/output structures.
  • Linear operators now treat their tags (for symmetry/positive-definite-ness/etc.) as static fields. This means that e.g. operators can now be used as the carry in a lax.scan.
  • lineax.SVD() now no longer returns NaNs when given a matrix of all zeros. (This is also an improvement over core JAX, which does not handle this case.)
  • Some performance improvements to autodiff-of-linear_solve.
  • Fixed autodiff-of-linear_solve crashing in a handful of edge cases. (When JAX passed symbolic zeros for AD.)
  • Many documentation fixes.

New Contributors

Full Changelog: v0.0.1...v0.0.2