Recent Releases of opt\_einsum - A Python package for optimizing contraction order for einsum-like expressions
opt\_einsum - A Python package for optimizing contraction order for einsum-like expressions - v3.4.0
3.4.0 / 2024-09-26
NumPy has been removed from opt_einsum as a dependency allowing for more flexible installs. Type hints have been added to the code base as well as an overhaul of the documentation to MkDocs here: https://dgasmith.github.io/opt_einsum/
New Features
- #160 Migrates docs to MkDocs Material and GitHub pages hosting.
- #161 Adds Python type annotations to the code base.
- #204 Removes NumPy as a hard dependency.
Enhancements
- #154 Prevents an infinite recursion error when the
memory_limitwas set very low for thedpalgorithm. - #155 Adds flake8 spell check to the doc strings
- #159 Migrates to GitHub actions for CI.
- #174 Prevents double contracts of floats in dynamic paths.
- #196 Allows
backend=Nonewhich is equivalent tobackend='auto' - #208 Switches to
ConfigParserinsetad ofSafeConfigParserfor Python 3.12 compatability. - #228
backend='jaxlib'is now an alias for thejaxlibrary - #237 Switches to
rufffor formatting and linting. - #238 Removes
numpy-specific keyword args from being explicitly defined incontractand uses**kwargsinstead.
Bug Fixes
- #195 Fixes a bug where
dpwould not work for scalar-only contractions. - #200 Fixes a bug where
parse_einsum_inputwould not correctly respect shape-only contractions. - #222 Fixes an erorr in
parse_einsum_inputwhere an output subscript specified multiple times was not correctly caught. - #229 Fixes a bug where empty contraction lists in
PathInfowould cause an error.
Scientific Software - Peer-reviewed
- Python
Published by dgasmith over 1 year ago
opt\_einsum - A Python package for optimizing contraction order for einsum-like expressions - v3.3.0
Adds a object backend for optimized contractions on arbitrary Python objects.
New Features
- (#145) Adds a
objectbased backend so thatcontract(backend='object')can be used on arbitrary objects such as SymPy symbols.
Enhancements
- (#140) Better error messages when the requested
contractbackend cannot be found. - (#141) Adds a check with RandomOptimizers to ensure the objects are not accidentally reused for different contractions.
- (#149) Limits the
remainingcategory for thecontract_pathoutput to only show up to 20 tensors to prevent issues with the quadratically scaling memory requirements and the number of print lines for large contractions.
Scientific Software - Peer-reviewed
- Python
Published by dgasmith almost 6 years ago
opt\_einsum - A Python package for optimizing contraction order for einsum-like expressions - v3.2.1
Bug Fixes
- (#131) Fixes an einstein subscript error message to point to the correct value.
- (#135) Lazily loads JAX similar to other backends.
Scientific Software - Peer-reviewed
- Python
Published by dgasmith about 6 years ago
opt\_einsum - A Python package for optimizing contraction order for einsum-like expressions - v3.2.0
Small fixes for the dp path and support for a new mars backend.
New Features
- (#109) Adds mars backend support.
Enhancements
- (#110) New
auto-hqand'random-greedy-128'paths. - (#119) Fixes several edge cases in the
dppath.
Bug fixes
- (#127) Fixes an issue where Python 3.6 features are required while Python 3.5 is
opt_einsum's stated minimum version.
Scientific Software - Peer-reviewed
- Python
Published by dgasmith about 6 years ago
opt\_einsum - A Python package for optimizing contraction order for einsum-like expressions - v3.1.0
Adds a new dynamic programming algorithm to the suite of paths.
Scientific Software - Peer-reviewed
- Python
Published by dgasmith over 6 years ago
opt\_einsum - A Python package for optimizing contraction order for einsum-like expressions - v3.0.1
Alters setup.py to correctly state that opt_einsum requires Python 3.5+. This will now correctly effect PyPI and other pip mirror downloads, v3.0.0 will be removed from PyPI to prevent further issues.
Scientific Software - Peer-reviewed
- Python
Published by dgasmith almost 7 years ago
opt\_einsum - A Python package for optimizing contraction order for einsum-like expressions - v3.0.0
This release moves opt_einsum to be backend agnostic while adding support
additional backends such as Jax and Autograd. Support for Python 2.7 has been dropped and Python 3.5 will become the new minimum version, a Python deprecation policy equivalent to NumPy's has been adopted.
New Features
- (#78) A new random-optimizer has been implemented which uses Boltzmann weighting to explore alternative near-minimum paths using greedy-like schemes. This provides a fairly large path performance enhancements with a linear path time overhead.
- (#78) A new PathOptimizer class has been implemented to provide a framework for building new optimizers. An example is that now custom cost functions can now be provided in the greedy formalism for building custom optimizers without a large amount of additional code.
- (#81) The
backend="auto"keyword has been implemented forcontractallowing automatic detection of the correct backend to use based off provided tensors in the contraction. - (#88) Autograd and Jax support have been implemented.
- (#96) Deprecates Python 2 functionality and devops improvements.
Enhancements
- (#84) The
contract_pathfunction can now accept shape tuples rather than full tensors. - (#84) The
contract_pathautomated path algorithm decision technology has been refactored to a standalone function.
Scientific Software - Peer-reviewed
- Python
Published by dgasmith almost 7 years ago
opt\_einsum - A Python package for optimizing contraction order for einsum-like expressions - v2.3.2
Bug Fixes:
- (#77) Fixes a PyTorch v1.0 JIT tensor shape issue.
Scientific Software - Peer-reviewed
- Python
Published by dgasmith over 7 years ago
opt\_einsum - A Python package for optimizing contraction order for einsum-like expressions - v2.3.1
Bug Fixes:
- Minor tweak to release procedure.
Scientific Software - Peer-reviewed
- Python
Published by dgasmith over 7 years ago
opt\_einsum - A Python package for optimizing contraction order for einsum-like expressions - v2.3.0
This release primarily focuses on expanding the suite of available path technologies to provide better optimization characistics for 4-20 tensors while decreasing the time to find paths for 50-200+ tensors. See Path Overview for more information.
New Features:
- (#60) A new greedy implementation has been added which is up to two orders of magnitude faster for 200 tensors.
- (#73) Adds a new branch path that uses greedy ideas to prune the optimal exploration space to provide a better path than greedy at sub optimal cost.
- (#73) Adds a new auto keyword to the
opt_einsum.contractpath option. This keyword automatically chooses the best path technology that takes under 1ms to execute.
Enhancements:
- (#61) The
opt_einsum.contractpath keyword has been changed to optimize to more closely match NumPy. path will be deprecated in the future. - (#61) The
opt_einsum.contract_pathnow returns aopt_einsum.contract.PathInfoobject that can be queried for the scaling, flops, and intermediates of the path. The print representation of this object is identical to before. - (#61) The default memory_limit is now unlimited by default based on community feedback.
- (#66) The Torch backend will now use tensordot when using a version of Torch which includes this functionality.
- (#68) Indices can now be any hashable object when provided in the "Interleaved Input" syntax.
- (#74) Allows the default transpose operation to be overridden to take advantage of more advanced tensor transpose libraries.
- (#73) The optimal path is now significantly faster.
Bug fixes:
- (#72) Fixes the "Interleaved Input" syntax and adds documentation.
Scientific Software - Peer-reviewed
- Python
Published by dgasmith over 7 years ago
opt\_einsum - A Python package for optimizing contraction order for einsum-like expressions - v2.2.0
New features: - (#48) Intermediates can now be shared between contractions, see here for more details. - (#53) Intermediate caching is thread safe.
Enhancements: - (#48) Expressions are now mapped to non-unicode index set so that unicode input is support for all backends. - (#58) Adds tensorflow and theano with shared intermediates.
Bug fixes:
- (#41) PyTorch indices are mapped back to a small a-z subset valid for PyTorch's einsum implementation.
Scientific Software - Peer-reviewed
- Python
Published by dgasmith over 7 years ago
opt\_einsum - A Python package for optimizing contraction order for einsum-like expressions - v2.1.3
Bug fixes:
- Fixes unicode issue for large numbers of tensors in Python 2.7.
- Fixes unicode install bug in README.md.
Scientific Software - Peer-reviewed
- Python
Published by dgasmith almost 8 years ago
opt\_einsum - A Python package for optimizing contraction order for einsum-like expressions - v2.1.2
Bug Fixes:
- Ensures versioneer.py is in MANIFEST.in for a clean pip install.
Scientific Software - Peer-reviewed
- Python
Published by dgasmith almost 8 years ago
opt\_einsum - A Python package for optimizing contraction order for einsum-like expressions - v2.1.1
Bug Fixes: - Minor tweak to release procedure.
Scientific Software - Peer-reviewed
- Python
Published by dgasmith almost 8 years ago
opt\_einsum - A Python package for optimizing contraction order for einsum-like expressions - v2.1.0
opt_einsum continues to improve its support for additional backends beyond NumPy with PyTorch.
We have also published the opt_einsum package in the Journal of Open Source Software. If you use this package in your work, please consider citing us!
New features:
- PyTorch backend support
- Tensorflow eager-mode execution backend support
Enhancements:
- Intermediate tensordot-like expressions are now ordered to avoid transposes.
- CI now uses conda backend to better support GPU and tensor libraries.
- Now accepts arbitrary unicode indices rather than a subset.
- New auto path option which switches between optimal and greedy at four tensors.
Bug fixes:
- Fixed issue where broadcast indices were incorrectly locked out of tensordot-like evaluations even after their dimension was broadcast.
Scientific Software - Peer-reviewed
- Python
Published by dgasmith almost 8 years ago
opt\_einsum - A Python package for optimizing contraction order for einsum-like expressions - v2.0.1
opt_einsum is a powerful tensor contraction order optimizer for NumPy and related ecosystems.
New Features
- Allows unlimited Unicode indices.
- Adds a Journal of Open-Source Software paper.
- Minor documentation improvements.
Scientific Software - Peer-reviewed
- Python
Published by dgasmith almost 8 years ago
opt\_einsum - A Python package for optimizing contraction order for einsum-like expressions - v2.0.0
opt_einsum is a powerful tensor contraction order optimizer for NumPy and related ecosystems.
New Features
- Expressions can be precompiled so that the expression optimization need not happen multiple times.
- The
greedyorder optimization algorithm has been tuned to be able to handle hundreds of tensors in several seconds. - Input indices can now be unicode so that expressions can have many thousands of indices.
- GPU and distributed computing backends have been added such as Dask, TensorFlow, CUPy, Theano, and Sparse.
Bug Fixes
- A error effecting cases where opt_einsum mistook broadcasting operations for matrix multiply has been fixed.
- Most error messages are now more expressive.
Scientific Software - Peer-reviewed
- Python
Published by dgasmith about 8 years ago
opt\_einsum - A Python package for optimizing contraction order for einsum-like expressions - v1.0
Official 1.0 release.
Einsum is a very powerful function for contracting tensors of arbitrary dimension and index. However, it is only optimized to contract two terms at a time resulting in non-optimal scaling for contractions with many terms. Opt_einsum aims to fix this by optimizing the contraction order which can lead to arbitrarily large speed ups at the cost of additional intermediate tensors.
Opt_einsum is also implemented into the np.einsum function as of NumPy v1.12.
Scientific Software - Peer-reviewed
- Python
Published by dgasmith over 9 years ago
opt\_einsum - A Python package for optimizing contraction order for einsum-like expressions - New BLAS support!
A large step towards to a full 1.0 release. BLAS usage is now automatically applied to all operations. Future releases will be more careful with regard to views and needless data copying.
Scientific Software - Peer-reviewed
- Python
Published by dgasmith almost 10 years ago
opt\_einsum - A Python package for optimizing contraction order for einsum-like expressions - Python 3 + `setup.py`
Adds Python 3 support in addition to installation through a setup.py command.
Scientific Software - Peer-reviewed
- Python
Published by dgasmith about 10 years ago