CPU-only Python package for the ConANN-modified FAISS bindings
Project description
conann Python package
conann/ is the publishable Python package source of truth for
this project. It wraps the ConANN-modified FAISS CPU bindings under the Python
distribution and import name conann.
The upstream C++ source of truth remains:
../conann-main/conann
This package builds wheels from that source, stages the generated Python files
under src/conann, and publishes them as:
pip install conann-0.1.0-*.whl
import conann
index = conann.IndexFlatL2(32)
It intentionally does not provide a top-level import faiss alias. The bundled
SWIG module names such as swigfaiss_avx2 stay internal to the conann
package.
Repository Layout
conann/
pyproject.toml package metadata
setup.py wheel distribution hook
scripts/ Linux build and verification scripts
tests/ import and synthetic smoke tests
tools/ staging tool for generated bindings
src/conann/ generated package tree after staging
Generated build output is not source and should not be committed:
build/dist/logs/results/venvs/src/conann/src/conann.egg-info/
Build Linux Wheels
Build the current selected Python:
scripts/build_local_wheel.sh
Build a specific pyenv Python:
scripts/build_one_python.sh 3.12.12
Build the full Linux matrix:
scripts/build_all_pythons.sh
Linux wheels are written to:
dist/linux_x86_64/
Windows Scripts
Windows packaging and verification scripts are also kept under this same root:
scripts/build_one_python_windows.ps1
scripts/build_all_pythons_windows.ps1
scripts/verify_wheels_windows.ps1
scripts/smoke_conann_wheel.py
The already-built release wheels are kept under this package root:
wheels/linux_x86_64/
wheels/win_amd64/
Verify Linux Wheels
Run install and runtime smoke tests across the Linux wheel matrix:
scripts/verify_wheels.sh
Verification artifacts are written to:
results/wheel_smoke_matrix.csv
results/wheel_smoke/
Basic Usage
import conann
import numpy as np
d = 32
nlist = 16
k = 5
rng = np.random.default_rng(123)
xb = rng.random((5000, d), dtype=np.float32)
xt = rng.random((2000, d), dtype=np.float32)
xq = rng.random((100, d), dtype=np.float32)
quantizer = conann.IndexFlatL2(d)
index = conann.IndexIVFFlat(quantizer, d, nlist, conann.METRIC_L2)
index.train(xt)
index.add(xb)
distances, labels = index.search(xq, k)
ConANN-specific IVF methods are exposed on supported IVF indexes:
calibration = index.calibrate_conann(
alpha=0.2,
k=k,
xq=xq,
ground_truth=labels,
calib_sz=0.5,
tune_sz=0.5,
dataset_key="example",
)
distances, labels = index.search_conann(xq, calibration, k=k)
report = index.conann_time_report()
metrics = index.evaluate_conann(labels, labels)
Package metadata:
conann.__version__ # "0.1.0"
conann.__faiss_version__ # "1.9.0"
Current Support
- Linux
x86_64:cp310,cp311,cp312,cp313,cp314 - Windows
win_amd64: release wheels are currently kept in../conann_windows/ - CPU-only package path
Notes
src/conann/is generated bytools/stage_conann_package.py.- The build depends on the ConANN-enabled FAISS fork under
../conann-main/conann. - Existing release artifacts are mirrored under
wheels/andresults/in this directory so publishing and documentation can work from one root. - Wheel publishing should use the wheels under
wheels/linux_x86_64/for Linux andwheels/win_amd64/for Windows. - This
conann/directory is the canonical package root. The existing release wheels were built earlier from working directories, but the repository metadata, scripts, and release notes should now be maintained from here.
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 Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file conann-0.1.0-cp314-cp314-win_amd64.whl.
File metadata
- Download URL: conann-0.1.0-cp314-cp314-win_amd64.whl
- Upload date:
- Size: 8.1 MB
- Tags: CPython 3.14, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
173254a9678c8f84e36236ca88a4829b39dffcb6254db4574bc262f6c2f39c1a
|
|
| MD5 |
3ab0516bb4f6e3d1a187f650ab0e5399
|
|
| BLAKE2b-256 |
71db9593e34eda59942fb8435a1708a647dee97c42edb2053bb46a267c2da633
|
File details
Details for the file conann-0.1.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: conann-0.1.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 16.5 MB
- Tags: CPython 3.14, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4958bfd467059f2f6c71a86b0c0f91e476134a88f25f1ec098e1ff6f026c3c7e
|
|
| MD5 |
ba4b8b278c7b2a1600be010eff822a9e
|
|
| BLAKE2b-256 |
0a1d6013cdf4809f072d193299e5a205f9f4bfaa6a6fe488506ee654b5758969
|
File details
Details for the file conann-0.1.0-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: conann-0.1.0-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 8.1 MB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e3626847497e271820a5c373358d8f172a876a130e48999cc7b5e70d75ed946
|
|
| MD5 |
734fdbba53278c81e3fc9b36da2f4554
|
|
| BLAKE2b-256 |
63dc0c4f5da0a51829edc0be07d79b540aff8faa7e644eb28310ff305c751590
|
File details
Details for the file conann-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: conann-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 16.5 MB
- Tags: CPython 3.13, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61fcc9b0598ba235a08fc464fa096c0cc45ebffb0ca5766c7eb2b7ee7d64f443
|
|
| MD5 |
42686761bcd49894c93104a32a406bea
|
|
| BLAKE2b-256 |
0c1536d470d24854e145463e215c5af3e9f3c5cf97f7d82fc7732b8125b33471
|
File details
Details for the file conann-0.1.0-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: conann-0.1.0-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 8.1 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba671fdca6de11afc81d48db01844017d7cb42ea82b649a7170d801665f13b9c
|
|
| MD5 |
4b1a2f9e80952504fa02f4845aab2358
|
|
| BLAKE2b-256 |
f1b4aabbb1f31518eb3e4d9b86fb3161eb260b0de5a1f68ba5757ea5efe56042
|
File details
Details for the file conann-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: conann-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 16.5 MB
- Tags: CPython 3.12, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa5fdfae96b5cfbb335b07c610b5b82ee1e1f0a929b7f099010c2efba24d1af0
|
|
| MD5 |
c4a7e2e4c72286d82d354da544f51983
|
|
| BLAKE2b-256 |
f6d19bdb248c5b0f33afab9ab9d7b287a3c0b994633d200f348c5846a7a973a4
|
File details
Details for the file conann-0.1.0-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: conann-0.1.0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 8.1 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86c10b436f42770207d7bf0761523cf067d6907d3beda6d7f439831c7696a115
|
|
| MD5 |
592028466ccefa220ea8d80eaf957679
|
|
| BLAKE2b-256 |
c336e1c3059c9924f5117fea46c7c3888e4bea9b9000f45ab72b83e4d9592282
|
File details
Details for the file conann-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: conann-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 16.5 MB
- Tags: CPython 3.11, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b769258a3763f0044b6d751dd20d334f2cdd22646a1ad44d592560e87416dea0
|
|
| MD5 |
0c40e8fc94291117a85d5b5d450eb9ff
|
|
| BLAKE2b-256 |
ecc76b8281e7796ad94bda4d6f2e746d35140f009963551cbaa0964be0394aff
|
File details
Details for the file conann-0.1.0-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: conann-0.1.0-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 8.1 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f78a4d98c1f5bc17a0b5715301457653e09099951f637805343d8e09c36792d0
|
|
| MD5 |
fadf9666931348f3d6d89367f1062fa9
|
|
| BLAKE2b-256 |
5a9d002ce38e87707d9f660c3270404041085550970d968402ff56e699c229ea
|
File details
Details for the file conann-0.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: conann-0.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 16.5 MB
- Tags: CPython 3.10, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0c45c27f1bb302395a314ae258702a1137c1e7b123c784a8edddfe46c4cf32a
|
|
| MD5 |
25d03b36c9f95405b91203808072bbd9
|
|
| BLAKE2b-256 |
60b84bf070cf2548223fabcc17b3809d444056296a4cec47a047f2ae271a9130
|