Releases: patrick-kidger/lineax
Releases · patrick-kidger/lineax
lineax v0.1.0
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 simplerAbstractLinearSolver.assume_full_rank. (Thanks @adconner! In particular for being so patient with me and my bugs 😅 #158)
Features
- Added the
lineax.LSMRsolver. This is a solver that will return the pseudoinverse (likelineax.SVD) solution, and handles nonsquare/singular matrices. In addition, it is an iterative solver. (Thanks @f0uriest @PTNobel @healeyq3 @johannahaffner! #86) - Added the
lineax.Normalsolver. 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
- Improved performance of tridiagonal solves. (Thanks @jpbrodrick89! #152)
New Contributors
Full Changelog: v0.0.8...v0.1.0
Lineax v0.0.8
- 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.DiagonalLinearOperatornow 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
- @Ceyron made their first contribution in #129
- @danielward27 made their first contribution in #133
Full Changelog: v0.0.7...v0.0.8
Lineax v0.0.7
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
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_matrixnow 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
- @dkweiss31 made their first contribution in #100
- @NeilGirdhar made their first contribution in #106
Full Changelog: v0.0.5...v0.0.6
Lineax v0.0.5
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.JacobianLinearOperatorfor whether to usejacfwdorjacrev. (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 to0.0.1.
New Contributors
- @thibmonsel made their first contribution in #75
Full Changelog: v0.0.4...v0.0.5
Lineax v0.0.4
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.conjwhich computes the conjugate of an operator. (E.g. for a matrix A, it returns A-bar.) - Added
lineax.AbstractLinearSolver.conj, which conjugates the result oflineax.AbstractLinearSolver.init. - Both of the above should be implemented when adding a new operator a new solver respectively.
- Added
Bugfixes
- Fixed
PyTreeLinearOperator.as_matrixreturning 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 theinternalnamespace means that these are undocumented/experimental, and may move somewhere else in the future.)
Internal changes
Now using ruff-format!
New Contributors
Full Changelog: v0.0.3...v0.0.4
Lineax v0.0.3
This is a minor bugfix release.
- Fixed a crash when differentiating
lineax.linear_solvebut 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.IdentityLinearOperatorwith different input/output structures. (#50)
Full Changelog: v0.0.2...v0.0.3
Lineax v0.0.2
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 nowIdentityLinearOperator(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_solvecrashing 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