Skip to main content

TileDB logo

TileDB-ML CI Coverage Badge

TileDB-ML

TileDB-ML is the repository that contains all machine learning oriented functionality TileDB supports. In this repo, we explain how someone can employ TileDB for machine learning oriented data management problems, and which are the next steps we have in mind. Here, we would firstly like to highlight our perspective on the relation of TileDB with general machine learning oriented data management problems and how TileDB engine could be the solution for efficiently storing any kind of machine learning data, i.e., from raw images, text, audio, time series and SAR to features and machine learning models. Before you proceed further, please take a quick look on our medium blog post, which targets to explain in great detail how TileDB addresses many machine learning data format requirements, overcoming the drawbacks of the other candidate formats, and take this opportunity to solicit feedback and contributions from the community.

Description

As mentioned above, this repository contains all machine learning oriented functionality TileDB supports. Specifically, code that can (or will be able to):

  • Save machine learning models as TileDB arrays (At the moment we provide implementations for saving Tensorflow Keras, PyTorch and Scikit-Learn models.)

  • Load machine learning models from TileDB arrays.

  • Read features, in order to train machine learning models, from TileDB arrays directly to machine learning framework's data APIs. We already support the Tensorflow and PyTorch data APIs with the use of Python generators for Dense and Sparse TileDB arrays, and we are similarly working on Scikit-Learn Pipelines which will be out soon.

Examples

We provide some detailed notebook examples on how to save and load machine learning models as TileDB arrays (also on TileDB-Cloud) and explain why this is useful in order to create simple and flexible model registries with TileDB.

We also provide detailed notebook examples on how to train Tensorflow and PyTorch models with the use of our Data APIs support for Dense TileDB arrays.

Finally, we also provide an End-To-End example on how to ingest data, train a PyTorch model and serve it with UDFs completely serverlessly on TileDB-Cloud.

Installation

TileDB-ML can be installed:

Quick Installation

  • from source by cloning the Git repository:

    git clone https://github.com/TileDB-Inc/TileDB-ML.git
    cd TileDB-ML
    
    # In case you want to install and check all frameworks. If you
    # use zsh replace .[full] with .\[full\]
    pip install -e .[full]
    
    # In case you want to install and check Tensorflow only. If you
    # use zsh replace .[tensorflow] with .\[tensorflow\]
    pip install -e .[tensorflow]
    
    # In case you want to install and check PyTorch only. If you
    # use zsh replace .[pytorch] with .\[pytorch\]
    pip install -e .[pytorch]
    
    # In case you want to install and check Scikit-Learn only. If you
    # use zsh replace .[sklearn] with .\[sklearn\]
    pip install -e .[sklearn]  
    
    # In case you want to try any of the aforementioned machine learning framework
    # on TileDB-Cloud try one of the follwoing.
    pip install -e .[tensorflow_cloud]
    pip install -e .[pytorch_cloud]
    pip install -e .[sklearn_cloud]
    
  • with pip from git:

    pip install git+https://github.com/TileDB-Inc/TileDB-ML.git@master
    
  • from PyPi:

pip install tiledb-ml

The above command will just install the basic dependency of tiledb-ml, hence tiledb. In order to install the integration for a specific framework you need to use:

pip install tiledb-ml[pytorch] # e.g. For checking only the Pytorch integration

Checking all the supported frameworks you will need to use:

pip install tiledb-ml[full]

The above commands apply to bash shell in case you use zsh you will need to escape the bracket character like the following for example:

pip install tiledb-ml\[pytorch\]
  • You may run the test suite with:
    python setup.py test
    

Note

Here we would like to highlight that our current implementations are not optimal, and they don't support the aforementioned machine learning frameworks 100%, e.g., serialization of model parts like numpy arrays, takes place with Pickle (which is far from optimal) because of its Python Only nature and insecurity as described here. We mainly show the universal data management ability of TileDB, and how elegantly applies in machine learning data of any kind. Optimizations will follow as soon as possible.

In any case, note that the TileDB-ML repository is under development, and the API is subject to change.

Contributing

We welcome all contributions! Please read the contributing guidelines before submitting pull requests.

The TileDB-ML package is Copyright 2018-2021 TileDB, Inc

License

MIT

Metadata

Release files for tiledb-ml 0.10.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tiledb-ml 0.10.1
File Size Uploaded Provenance Actions
tiledb_ml-0.10.1.tar.gz 176.4 kB Without provenance Details for tiledb_ml-0.10.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tiledb-ml 0.10.1
File Interpreter ABI Platform Actions
tiledb_ml-0.10.1-py3-none-any.whl Python 3 none any Details for tiledb_ml-0.10.1-py3-none-any.whl

Total release size: 243.9 kB

Release files / tiledb_ml-0.10.1.tar.gz

Download URL tiledb_ml-0.10.1.tar.gz
Size 176.4 kB
Tags Source
SHA-256 checksum
How to use checksums
afbf11ca808e4d70d124bc2642085dd5767d3fc5af9f404171f10984b20db0d7
BLAKE2b-256 checksum
How to use checksums
0c22a29599e5093b93c5d69790790289456d27594770b5928c84b824f6e6d92a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / tiledb_ml-0.10.1-py3-none-any.whl

Download URL tiledb_ml-0.10.1-py3-none-any.whl
Size 67.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0e8ee669457fe2bbc277b3e68efcbb2dc3ba2015b9e170015daa7d9b45a53006
BLAKE2b-256 checksum
How to use checksums
5b96831dfd0357735fc6fcc14313d002196cb883ca4330af27cf29922016ab64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Security for tiledb-ml 0.10.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page