Skip to main content

Native (C++) implementation of Banded Matrices for TensorFlow

Project description

Banded Matrices

Overview

A library providing C++ linear algebra operators (matmul, solve, ...) dedicated to banded matrices and a TensorFlow interface. This extends the set of existing TensorFlow operators which as of August 2021 only include banded_triangular_solve.

Details on the implemented operators may be found in Durrande et al.: "Banded Matrix Operators for Gaussian Markov Models in the Automatic Differentiation Era", and in Adam et al.: "Doubly Sparse Variational Gaussian Processes"

Installation

For users

To install the latest (stable) release of the toolbox from PyPI, use pip:

$ pip install banded_matrices

For contributors

This project uses Poetry to manage dependencies in a local virtual environment. To install Poetry, follow the instructions in the Poetry documentation.

To install this project in editable mode, run the commands below from the root directory of the banded_matrices repository.

poetry install

This command creates a virtual environment for this project in a hidden .venv directory under the root directory.

You must also run the poetry install command to install updated dependencies when the pyproject.toml file is updated, for example after a git pull.

The project currently supports Python 3.10, 3.11, and 3.12. If Poetry selects a different Python version, use the command below to point it at a supported interpreter before installing:

poetry env use python3.12 && poetry install

NOTE: Unlike most other Python packages, by installing the banded_matrices package from source you will trigger a compilation of the C++ TensorFlow ops library. This means that running poetry install can take a while - in the order of 5 minutes, depending on the machine you are installing onto.

Known issues

Source installs require a working C++ compiler and CMake, and the build links against the TensorFlow version installed in the project environment. If you are only using the package as a dependency, prefer installing a released wheel with pip.

Running the tests

Run these commands from the root directory of this repository. To run the full Python test suite, including pylint and Mypy, run:

poetry run task test

Alternatively, you can run just the unit tests, starting with the failing tests and exiting after the first test failure:

poetry run task quicktest

To run linting of the C++ code (using cpplint), run:

poetry run task cpplint

NOTE: Running the tests requires that the project virtual environment has been updated. See Installation.

The Secondmind Labs Community

Getting help

Bugs, feature requests, pain points, annoying design quirks, etc: Please use GitHub issues to flag up bugs/issues/pain points, suggest new features, and discuss anything else related to the use of banded_matrices that in some sense involves changing the banded_matrices code itself. We positively welcome comments or concerns about usability, and suggestions for changes at any level of design. We aim to respond to issues promptly, but if you believe we may have forgotten about an issue, please feel free to add another comment to remind us.

Slack workspace

We have a public Secondmind Labs slack workspace. Please use this invite link and join the #banded_matrices channel, whether you'd just like to ask short informal questions or want to be involved in the discussion and future development of banded_matrices.

Contributing

All constructive input is very much welcome. For detailed information, see the guidelines for contributors.

Maintainers

Banded_matrices was originally created at Secondmind Labs and is now maintained by (in alphabetical order) Vincent Adam, Artem Artemev. We are grateful to all contributors who have helped shape banded_matrices.

Banded_matrices is an open source project. If you have relevant skills and are interested in contributing then please do contact us (see "The Secondmind Labs Community" section above).

We are very grateful to our Secondmind Labs colleagues, maintainers of GPflow, GPflux, Trieste and Bellman, for their help with creating contributing guidelines, instructions for users and open-sourcing in general.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

banded_matrices-0.2.1.tar.gz (65.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

banded_matrices-0.2.1-cp312-cp312-manylinux_2_28_x86_64.manylinux_2_24_x86_64.whl (17.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

banded_matrices-0.2.1-cp312-cp312-macosx_11_0_arm64.whl (331.6 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

banded_matrices-0.2.1-cp311-cp311-manylinux_2_28_x86_64.manylinux_2_24_x86_64.whl (17.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

banded_matrices-0.2.1-cp311-cp311-macosx_11_0_arm64.whl (331.6 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

banded_matrices-0.2.1-cp310-cp310-manylinux_2_28_x86_64.manylinux_2_24_x86_64.whl (17.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

banded_matrices-0.2.1-cp310-cp310-macosx_11_0_arm64.whl (331.6 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file banded_matrices-0.2.1.tar.gz.

File metadata

  • Download URL: banded_matrices-0.2.1.tar.gz
  • Upload date:
  • Size: 65.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for banded_matrices-0.2.1.tar.gz
Algorithm Hash digest
SHA256 b3bfb60d76c15c9ca1a8ff144d0f1cd6c390792c162ef76fa6ab70fac59ced67
MD5 b5a31b983cf436afd4b48386ba06031a
BLAKE2b-256 8c09d22d9ef3be9323be61d7f8f31b80a5a582bde68b37b24fa78d092a528ff6

See more details on using hashes here.

File details

Details for the file banded_matrices-0.2.1-cp312-cp312-manylinux_2_28_x86_64.manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for banded_matrices-0.2.1-cp312-cp312-manylinux_2_28_x86_64.manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 541b83d658cbb19af44f17e67edc5fe86183daf6e6f775a379f20320eb0a2cad
MD5 ab207e3cae4c6a3b1635615e7322a8ef
BLAKE2b-256 60f9d466be6dbf589074a1fbee93b73ae92cdf7fe74306b5d5d1356492ee798c

See more details on using hashes here.

File details

Details for the file banded_matrices-0.2.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for banded_matrices-0.2.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 394bde54c795ea1ec946e4a3e6400aeec50836abc895a0037ccd073e4f34cc59
MD5 01877e0d218235f98fef3bff2eb7f17b
BLAKE2b-256 20ae9be5398d2e76d777db63e9aa76b800d79d7755934ec819d6478658fb5436

See more details on using hashes here.

File details

Details for the file banded_matrices-0.2.1-cp311-cp311-manylinux_2_28_x86_64.manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for banded_matrices-0.2.1-cp311-cp311-manylinux_2_28_x86_64.manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 b5e5d7a264a81a1c0fdf6df6f9e5fb50d4f19b4ee28950310a98113c86bf6a86
MD5 efec33945b2f8bb01134bd0c8f633bac
BLAKE2b-256 24b4b61c435329d828ce3962d85693e10e285c7af01393710555d6d1846f9518

See more details on using hashes here.

File details

Details for the file banded_matrices-0.2.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for banded_matrices-0.2.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f175fe6b19c6d040f1873350dcc911c9d382d00e24189b6d9463de7b461f9f46
MD5 e1377a59aa26893c86e33b0f00251457
BLAKE2b-256 4a4b3e42f60e4b53c5732cb53776b3be948e7e7473df493c287c07cc5e8ec696

See more details on using hashes here.

File details

Details for the file banded_matrices-0.2.1-cp310-cp310-manylinux_2_28_x86_64.manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for banded_matrices-0.2.1-cp310-cp310-manylinux_2_28_x86_64.manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 603bd9e6e2982e435ff1b1e8356da7a470c026b3bf760af17ea95813d1e942a2
MD5 1cc4d0ee34dd20738fc195291f69042e
BLAKE2b-256 a6ca64ccbbd57fb11952d18a84b9d44798248cf82e36cc69abc6d5fdb7db9736

See more details on using hashes here.

File details

Details for the file banded_matrices-0.2.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for banded_matrices-0.2.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fe8ac2766ad2d842cb747c51f0f852b06de641f48467abc82fca0e90d89a311f
MD5 c0fa41eb51be9f757c43381a61285314
BLAKE2b-256 3102eaa9350048039185b9e8a645a50170c5f429bc89993f9938446953e71d28

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page