Parallel compressed cover tree (PCCT) library targeting JAX-based Vecchia GP workloads.
Project description
Covertreex
A parallel compressed cover tree (PCCT) library optimized for Vecchia-style Gaussian process pipelines. Features a hybrid Python/Numba + Rust implementation for high-performance CPU workloads.
Installation
pip install covertreex
For development:
pip install -e ".[dev]"
maturin develop --release # Build Rust backend
Quick Start
from covertreex.api import PCCT, Runtime
# Configure runtime
runtime = Runtime(metric="euclidean", enable_numba=True)
# Build tree and query
with runtime.activate() as ctx:
tree = PCCT(runtime).fit(points)
indices, distances = tree.knn(queries, k=10, return_distances=True)
CLI Usage
# List available profiles
python -m cli.pcct profile list
# Run k-NN benchmark
python -m cli.pcct query --dimension 8 --tree-points 8192 --queries 512 --k 8
# Build tree only
python -m cli.pcct build --dimension 8 --tree-points 65536 --batch-size 1024
# Environment check
python -m cli.pcct doctor --profile default
Execution Engines
Three engines are available via --engine:
| Engine | Description |
|---|---|
python-numba |
Reference Python/Numba implementation with full telemetry |
rust-natural |
Rust backend with natural point ordering |
rust-hilbert |
Rust backend with Hilbert curve reordering (fastest builds) |
The Rust backend is enabled by default. Disable with COVERTREEX_ENABLE_RUST=0.
Residual Correlation Metric
For Gaussian process applications, the library supports residual correlation with configurable kernels:
python -m cli.pcct query \
--metric residual \
--residual-kernel-type 1 \ # 0=RBF, 1=Matern52
--engine rust-hilbert
Benchmark Suite
# Gold standard benchmark (N=32k, D=3, residual)
./benchmarks/run_residual_gold_standard.sh
# Rust vs Python comparison
python benchmarks/comprehensive_residual_benchmark.py
# Reference benchmarks for CI
python tools/run_reference_benchmarks.py
Documentation
CLAUDE.md— Development guide and commandsCHANGELOG.md— Release notesdocs/— API reference and examples
License
MIT
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 Distribution
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 covertreex-0.0.4-cp313-cp313-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: covertreex-0.0.4-cp313-cp313-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 779.6 kB
- Tags: CPython 3.13, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29faa5ef0ff09d6eddaeedebb8e9df1eb3acac7d79cf9afd43a552d0fc3c5f09
|
|
| MD5 |
c0d2af2863e9e80a40477f85206ed908
|
|
| BLAKE2b-256 |
9d8c0e9a47a479e6c313a6fa512eb1d527ba9d93341d3d68baa9b63494727042
|