Skip to content

Add KyroDB ANN-Benchmarks integration#622

Open
vatskishan03 wants to merge 1 commit into
erikbern:mainfrom
vatskishan03:add-kyrodb
Open

Add KyroDB ANN-Benchmarks integration#622
vatskishan03 wants to merge 1 commit into
erikbern:mainfrom
vatskishan03:add-kyrodb

Conversation

@vatskishan03

Copy link
Copy Markdown

Summary

  • add the KyroDB ANN-Benchmarks algorithm package
  • register kyrodb in the benchmark workflow matrix

Validation

  • pytest
  • python install.py --algorithm kyrodb
  • python run.py --docker-tag ann-benchmarks-kyrodb --max-n-algorithms 3 --runs 2 --dataset random-xs-20-angular --run-disabled --timeout 300
  • python run.py --docker-tag ann-benchmarks-kyrodb --max-n-algorithms 3 --runs 2 --dataset random-xs-20-angular --run-disabled --batch --timeout 300
  • python plot.py --dataset random-xs-20-angular --output plot.png
  • python plot.py --dataset random-xs-20-angular --output plot-batch.png --batch
  • python data_export.py --out test.csv
  • python create_website.py --outputdir . --scatter --latex

Notes

  • Supports angular/cosine and euclidean/l2.
  • inner_product is intentionally unsupported in this adapter.
  • The algorithm Dockerfile pins KyroDB commit 7f113a73c6d6853a2c111e78dc87ed53acc95bee.

Add the KyroDB ANN-Benchmarks algorithm package and register it in the benchmark workflow matrix.

This submission pins the validated KyroDB engine revision in the algorithm Dockerfile and includes the Euclidean/cosine adapter, official benchmark parameter groups, and CI coverage through the upstream ANN-Benchmarks workflow.

Validated locally against the upstream workflow path:
- pytest
- python install.py --algorithm kyrodb
- python run.py random-xs-20-angular (single-query)
- python run.py random-xs-20-angular --batch
- plot.py, data_export.py, create_website.py
Copilot AI review requested due to automatic review settings March 13, 2026 04:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds KyroDB as a new ANN-Benchmarks algorithm integration, including the Python adapter, Docker image build, and CI workflow registration so it can be built and benchmarked alongside existing libraries.

Changes:

  • Introduces a KyroDB Python adapter that calls into libkyrodb_engine via ctypes.
  • Adds KyroDB algorithm configuration (config.yml) and a Dockerfile to build/copy the KyroDB FFI library into the benchmark image.
  • Registers kyrodb in the GitHub Actions benchmark workflow matrix.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
ann_benchmarks/algorithms/kyrodb/module.py Implements the KyroDB ANN adapter + FFI loader and query/build plumbing.
ann_benchmarks/algorithms/kyrodb/config.yml Defines KyroDB run groups/params for benchmark runs.
ann_benchmarks/algorithms/kyrodb/Dockerfile Builds KyroDB engine with FFI support and installs the shared library into the runtime image.
.github/workflows/benchmarks.yml Adds kyrodb to the benchmark CI matrix.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

raise ValueError(
f"query dimension mismatch: expected {self._dimension}, got {vec.size}"
)
if self._normalize and not self._trusted_input:
Comment on lines +14 to +32
trusted_input: true
query_args: [[20, 40, 80, 120, 200, 300, 400, 600]]
M-24:
args:
M: 24
ef_construction: 200
trusted_input: true
query_args: [[20, 40, 80, 120, 200, 300, 400, 600]]
M-36:
args:
M: 36
ef_construction: 300
trusted_input: true
query_args: [[20, 40, 80, 120, 200, 300, 400, 600]]
M-48:
args:
M: 48
ef_construction: 300
trusted_input: true
Comment on lines +9 to +15
try:
from ..base.module import BaseANN
except ImportError:
class BaseANN:
pass


Comment thread ann_benchmarks/algorithms/kyrodb/module.py

@vatskishan03 vatskishan03 left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NO CHANGES REQUIRED, everything is good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants