Recent Releases of Φ-ML

Φ-ML - 1.14.0

Among various fixes, version 1.14 adds support for parallel computation of dataclass properties using multiprocessing. Frozen dataclasses can now declare @parallel_property similar to @cached_property. Calling parallel_compute computes these properties and their dependencies using a process pool, possibly in multiple stages.

Other highlights

  • Shape.item_names have been renamed to labels.
  • Added file-backed tensors. These will be temporarily loaded on demand.
  • Add support for various PyTorch float types
  • Add Tensor.item()
  • @sliceable dataclasses now support dim instantiation on construction via lazy_dims=False
  • Initial support for PyTorch hooks (__pytorch_function__)
  • Optimized startup time by excluding scipy.signal from default imports
  • Expanded support for Layouts

pip install phiml==1.14.0

Scientific Software - Peer-reviewed - Python
Published by holl- 10 months ago

Φ-ML - 1.13.2

Bug fixes, improvements to train(), get peak GPU memory usage, selective gather, index by None.

pip install phiml==1.13.2

Scientific Software - Peer-reviewed - Python
Published by holl- 11 months ago

Φ-ML - 1.13

Version 1.13 adds phiml.os for vectorized os calls. It includes the additional convenience functions list_files and list_directories with file filter options.

Other highlights

  • Add *size and *range functions
  • SciPy iterative solves now support trajectory recording
  • Support training multiple PyTorch modules with update_weights()
  • Simplify showing progress in map()
  • find_closest() can now be invoked w/o queries to obtain a reference to the acceleration structure
  • Add get_learning_rate() and set_learning_rate()
  • Add train for training neural networks with automatic data transfer to compute device
  • Support batched save and load
  • Add Tc, Ts, Ti to all @sliceable dataclasses

Experimental features

  • Strided convolutions and deconvolutions
  • Add module_from_variables
  • Add phiml.latent package with initial support for UDIM

Deprecations

  • Tensor.T, use Tc, Ti or Ts instead.

Scientific Software - Peer-reviewed - Python
Published by holl- about 1 year ago

Φ-ML - 1.12

Version 1.12 sees major performance improvements for eager execution.

Other highlights

  • sort now supports sorting by key. Added *sort aliases.
  • The linear solver scipy-lsqr is now available, scipy-direct now performs a convergence check by default.
  • Rank-deficient linear systems are now solved by discarding n rows/cols from the sparse matrix.
  • New functions unravel_index
  • New submodule phiml.math.perm
  • New aliases p... for reducing all primal dims
  • where() now supports dataclasses
  • Add dataclasses.copy()

Scientific Software - Peer-reviewed - Python
Published by holl- over 1 year ago

Φ-ML - 1.11.0

This release adds official support for custom dataclasses in the phiml.dataclasses module.

Highlights

  • Dataclass decorators @sliceable, @data_eq
  • Replacing some fields of a dataclass instance keeps all unaffected caches from @cached_property
  • Dataclasses no longer need to handle None values in comparisons when used in JIT or other tracing.
  • Shorthand function *max, *min, *prod, *pack for specific dim types
  • New syntax for item name renaming while slicing, e.g. tensor['y,x->a,b] selects the slices x and y and renames them.
  • Add squeeze to remove singleton dims
  • Improve formatting of sparse matrices
  • clip() now accepts Shape for the upper limit
  • Dim packing functions can now also be used for unpacking when passing one input and multiple output dims.

Scientific Software - Peer-reviewed - Python
Published by holl- over 1 year ago

Φ-ML - 1.10.0

This release adds a lot of new functionality and pushes the new paradigm of letting users define custom types as @dataclass with @cached_property derived values.

  • Expanded support for non-uniform tensors and sparse matrices
  • Add tensor transpose shorthands Tensor.Ti, .Tc, .Ts and Tensor.dim.T. The old transpose is now called swap_axes.
  • Add save, load to store using any (nested) tensor data using NumPy
  • Add ncat and tcat variants (ccat, icat, scat, dcat)
  • Add random_permutation, pick_random
  • Functions such as slice, max, min now accept range to return the gather indices
  • Add softmax, nan_to_0, counter_intersections
  • Multi-Tensor unpacking in unpack
  • Add Tensor.print
  • Add *sum and *mean functions for the various dimension types
  • Add map_d2b and map_c2d
  • range is now also available as arange
  • Deprecate rotation functions and move to PhiFlow
  • Improved dataclass attribute detection, add experimental dataclass_getitem

Plus tons of bug fixes!

bash pip install phiml==1.10.0

Scientific Software - Peer-reviewed - Python
Published by holl- over 1 year ago

Φ-ML - 1.9.3

Bug fixes plus

  • Performance optimization for stack()
  • experimental save/load
  • at_min, at_max now support sparse matrices

Scientific Software - Peer-reviewed - Python
Published by holl- over 1 year ago

Φ-ML - 1.9.2

Various smaller bug fixes, map now exposes expand_results.

Scientific Software - Peer-reviewed - Python
Published by holl- over 1 year ago

Φ-ML - 1.9.0

Highlights

  • convolve now behaves like matrix multiplication, reducing dual dims of the kernel
  • Tensor @ Tensor can now be used to reduce channel dims in the absence of dual dims
  • Improved support for shape spec strings, concat now supports packing using the syntax t->name:t
  • Multi-dimensional cumulative_sum
  • Improved support for non-uniform and sparse tensors
  • New functions d2s, contains, count_occurrences, Tensor.map(), ravel_index and aliases rotate, cross
  • Shape concatenation via Shape + Shape

Scientific Software - Peer-reviewed - Python
Published by holl- over 1 year ago

Φ-ML - 1.8.0

Highlights

  • NumPy 2 compatibility
  • Tensor.numpy() and .native() now support dim packing
  • wrap() and tensor() now support shape spec strings, e.g. 'example:b,(x,y,z)'
  • Compact sparse tensors can now be created using sparse_tensor (experimental)
  • Support for SVD and eigenvalues
  • Shorthand notation dim in Tensor
  • Various improvements for sparse tensors
  • Support save/load on Stax nets
  • Added tensor.T to transpose a tensor. This switches primal/dual dims.
  • Added functions ravel_index, d2i and aliases length, rand, randn.
  • Shapes can now be stacked using stack
  • unpack_dim can now be used with non-uniform targets

Scientific Software - Peer-reviewed - Python
Published by holl- over 1 year ago

Φ-ML - 1.7.4

NumPy 2.0 fixes, improved support for sparse tensors.

pip install phiml==1.7.4

Scientific Software - Peer-reviewed - Python
Published by holl- almost 2 years ago

Φ-ML - 1.7.2

Fixes NumPy compatibility and other bug fixes, adds convenience features.

Scientific Software - Peer-reviewed - Python
Published by holl- almost 2 years ago

Φ-ML - 1.7.1

Bug fixes, improved CompactSparseTensor support.

Scientific Software - Peer-reviewed - Python
Published by holl- almost 2 years ago

Φ-ML - 1.7.0

New features

  • Sparse SciPy and ML tensors can now be wrapped like regular tensors.
  • Shorthand shape & dual to add corresponding dual dims
  • Added experimental compact sparse tensor
  • Removing dims from a Shape can now be done using the - operator.
  • Generic type conversion via Shape.as_type().

Improvements

  • scatter() is now more flexible with treat_as_batch argument.
  • Improvements to linear tracing. Improved rank deficiency detection. Linear solves will only use matrix_offset if confirmed by user.
  • minimum and maximum can now be used with None values.
  • Stacked trees may now include None values.
  • reshaped_native() and reshaped_numpy() now support () / None for singleton dims

Scientific Software - Peer-reviewed - Python
Published by holl- almost 2 years ago

Φ-ML - 1.6.0

Numerous fixes and various new features, see #6

Highlights

  • JAX buffer management for variable-sized tensors
  • JIT improvements and fixes
  • Periodic pairwise_differences() and fixes
  • Extrapolation by side with '+' and '-'
  • Added substeps to iterate()
  • Regularized linear solves for singular matrices
  • Add safe_mul()

Scientific Software - Peer-reviewed - Python
Published by holl- almost 2 years ago

Φ-ML - 1.5.1

Bug fix release.

Includes sparse matrix, linear tracing, TensorFlow fixes and adds the alias pairwise_differences.

bash pip install phiml==1.5.1

Scientific Software - Peer-reviewed - Python
Published by holl- about 2 years ago

Φ-ML - 1.5.0

The Φ-ML paper has been published! DOI

This version updates the value/variable attribute system and is compatible with TensorFlow 2.16 and the latest JAX versions.

Highlights

  • Value attributes are now used in optimization and gradient computation.
  • tensorflow_probability is no longer required for median() and quantile()
  • Added find_differences to compare trees
  • Added sort
  • grid_sample and closest_grid_values now support specifying grid dims via coordinates

Notable fixes

  • PyTorch's long-standing JIT adjoint linear solve problem has been resolved
  • Tracing JIT functions within a gradient function no longer stores the gradients (caused JAX escaped tracers)

bash pip install phiml==1.5.0

Scientific Software - Peer-reviewed - Python
Published by holl- about 2 years ago

Φ-ML - 1.4.0

Version 1.4 adds a lot of functionality to Φ-ML and includes a ton of fixes!

This version is archived at figshare, DOI: DOI.

Highlights

  • Users now have more control over sparse matrices with to_format for sparse/dense conversion and is_sparse.
  • Added find_closest() with dense and k-d tree implementations
  • New functions argmin, argmax, equal, erf, incomplete_gamma
  • Improved gradient descent optimizer via math.minimize()
  • Support ... for remaining dimensions in reshaped_native, reshaped_tensor.
  • scatter now supports modes min, max, prod, any, all
  • min, max, nonzero now support sparse tensors
  • random_uniform now supports setting limits by Tensor
  • cross_product now retains item names
  • slice now supports primitives
  • map now supports dims='object' to map over layout dimensions
  • Non-uniform tensors can now be used with dot, median
  • vec now allows empty vectors
  • linspace now supports multiple dimensions
  • Sparse-sparse matrix multiplication

Scientific Software - Peer-reviewed - Python
Published by holl- over 2 years ago

Φ-ML - 1.3.1

Bug fixes, improved compatibility for all_available, gather, map

Scientific Software - Peer-reviewed - Python
Published by holl- over 2 years ago

Φ-ML - 1.3.0

Highlights

  • New functions at_min, at_max, neighbor_min, etc.
  • New JIT-specific functions when_available and perf_counter().
  • @broadcast now supports specifying keyword arguments
  • Support for custom types has been improved, e.g. in gather, flatten
  • iterate now allows None as initial value and skips it when stacking
  • Experimental support for higher-order dual dims (internal at the moment).
  • Experimental tracing of linear functions involving gather / scatter operations and sparse tensors.
  • Lots of bug fixes

Breaking changes

  • stack and map no longer wrap non-shapable function outputs

python pip install phiml==1.3.0

Scientific Software - Peer-reviewed - Python
Published by holl- over 2 years ago

Φ-ML - 1.2.1

Bug fixes. bash pip install phiml==1.2.1

Scientific Software - Peer-reviewed - Python
Published by holl- over 2 years ago

Φ-ML - 1.1.0

Improvements and new features

  • Improved map() and broadcast with correct kwargs handling and user-defined slicing
  • Support for rotation matrices and 3D rotations
  • Improved degree-radians conversions
  • Extrapolation improvements, added extrapolation.get_normal() and get_tangential()
  • Added Shape.as<type>(), assert_all_sizes_defined() convenience methods

bash pip install phiml==1.1.0

Scientific Software - Peer-reviewed - Python
Published by holl- over 2 years ago

Φ-ML - 1.0.4

Minor additions and fixes.

  • rotate_vector() now accepts rotation matrices
  • Added extrapolation.get_normal() and get_tangential()
  • Added Shape.as<type>() convenience methods

bash pip install phiml==1.0.4

Scientific Software - Peer-reviewed - Python
Published by holl- over 2 years ago

Φ-ML - 1.0.3

Extrapolation bug fixes.

bash pip install phiml==1.0.3

Scientific Software - Peer-reviewed - Python
Published by holl- over 2 years ago

Φ-ML - 1.0.2

Extrapolation bug fixes. Tensors can now be padded with non-constant edge values.

bash pip install phiml==1.0.2

Scientific Software - Peer-reviewed - Python
Published by holl- over 2 years ago

Φ-ML - 1.0.1

Bug fixes, added support for 3D rotations.

bash pip install phiml==1.0.1

Scientific Software - Peer-reviewed - Python
Published by holl- almost 3 years ago

Φ-ML - 1.0.0

Initial release of PhiML. The code was originally developed inside the ΦFlow repository and split off after version 2.4. Major changes since the split include

  • Adding math.use() as the primary way to specify which library to use.
  • Automatic backend initialization when passing backend-specific tensors.
  • Unifying the neural network libraries
  • Adding documentation
  • Fixing various bugs

Scientific Software - Peer-reviewed - Python
Published by holl- almost 3 years ago