ANN-interface library
Project description
Annime Project
Overview
Annime (Approximate Nearest Neighbors Interface for Metrics Evaluation) is an open-source library that provides a unified interface for various Approximate Nearest Neighbor (ANN) implementations. It supports multiple ANN libraries including Annoy, NGT, NMSLIB, Faiss, Hnswlib, ScaNN, and Datasketch. This library is designed to simplify the process of benchmarking and evaluating the performance of different ANN algorithms.
Features
- Unified interface for multiple ANN libraries
- Easy integration and usage
- Comprehensive set of methods for building, querying, and managing ANN indices
- Benchmarking and performance evaluation tools
Installation
To install Annime, clone the repository and install the dependencies using pip
:
git clone https://github.com/Azherhs/Annime.git
cd Annime
pip install -r requirements.txt
or
pip install annime
Usage
To use the Annime library, import the specific ANN interface you need and follow the provided examples:
Example with Annoy
from annime.annoy_int import AnnoyANN
# Initialize the Annoy interface
annoy_ann = AnnoyANN(dim=100, metric='euclidean')
# Build the index with your data
data_points = ... # Your ndarray data points
annoy_ann.build_index(data_points)
# Query the index
query_point = ... # Your query point
results = annoy_ann.query(query_point, k=5)
print(results)
Example with NMSLIB
from annime.nmslib_int import NmslibANN
# Initialize the NMSLIB interface
nmslib_ann = NmslibANN(space='l2', method='hnsw')
# Build the index with your data
data_points = ... # Your ndarray data points
nmslib_ann.build_index(data_points)
# Query the index
query_point = ... # Your query point
results = nmslib_ann.query(query_point, k=5)
print(results)
Running Tests
To ensure that everything is working correctly, you can run the provided tests using pytest:
pytest
Supported Libraries
Annime currently supports the following ANN libraries:
- Annoy
- Datasketch
- Faiss
- Hnswlib
- NGT
- NMSLIB
- ScaNN
Contributing
We welcome contributions from the community! If you would like to contribute to Annime, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Implement your changes and commit them to your branch.
- Submit a pull request detailing your changes.
Please ensure your code adheres to the project's coding standards and includes appropriate tests.
License
This project is licensed under the MIT License. See the LICENSE file for more details.
Contact
For any inquiries or issues, please open an issue on the GitHub repository.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file annime-0.1.0.1.tar.gz
.
File metadata
- Download URL: annime-0.1.0.1.tar.gz
- Upload date:
- Size: 55.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3312d90af67b97682c25db289a216adcf2fb58865ba1afd668fc8d8d0b4f26d |
|
MD5 | 5b3b1964ca0a25fda5b5a8c1b65ded1f |
|
BLAKE2b-256 | d18c3646ba10bbdf3a5e1e6e2d35bbc2f47ea5d76972b7d737ca1d4b0010cbbd |
File details
Details for the file annime-0.1.0.1-py3-none-any.whl
.
File metadata
- Download URL: annime-0.1.0.1-py3-none-any.whl
- Upload date:
- Size: 91.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a92722f02e9a1abfeec90c6131ed667c2a3b7b409af6ca1665aaf2b2f33d39f |
|
MD5 | d41c31823b8fa8edd93e0889f98ca1cc |
|
BLAKE2b-256 | eb2c8b7fb6a1a8c1316995253f640bb9e792852c36ce16467e1a26399ffa2843 |