Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
af71bf1
Declare h5py as a cuvs-bench dependency
nvzm123 Jul 31, 2026
9b43125
Persist results from in-process benchmark backends
nvzm123 Jul 31, 2026
6aa3570
Add PyLucene backend to cuvs-bench
nvzm123 Jul 31, 2026
0483c2b
Add live PyLucene integration coverage
nvzm123 Jul 31, 2026
57787eb
Document PyLucene backend setup and usage
nvzm123 Jul 31, 2026
8ad5641
Merge remote-tracking branch 'origin/main' into agent/pylucene-benchm…
nvzm123 Aug 14, 2026
1f206be
Align Python backend results with current cuvs-bench
nvzm123 Aug 14, 2026
2ab45a9
Update PyLucene backend for current cuVS-Lucene codecs
nvzm123 Aug 14, 2026
cfea7d8
Refresh PyLucene setup and usage documentation
nvzm123 Aug 14, 2026
0f08938
Merge upstream main into PyLucene backend branch
nvzm123 Aug 14, 2026
f28343c
Merge upstream main into PyLucene backend branch
nvzm123 Aug 17, 2026
3155a67
Align PyLucene with Lucene 10.2
nvzm123 Aug 17, 2026
4110093
Refresh PyLucene 10.2 setup guidance
nvzm123 Aug 17, 2026
aee920e
Expose PyLucene HNSW benchmark parameters
nvzm123 Aug 17, 2026
06b9a8f
Document configurable PyLucene HNSW benchmarks
nvzm123 Aug 17, 2026
d396b62
Update PyLucene setup for in-tree cuVS-Lucene
nvzm123 Aug 19, 2026
06a1a2f
Add dedicated PyLucene backend guide
nvzm123 Aug 20, 2026
f993daa
Organize PyLucene tests
nvzm123 Aug 20, 2026
ffecfa2
Merge main into agent/pylucene-benchmark-backend
nvzm123 Sep 1, 2026
1f82600
Move PyLucene E2E coverage into cuvs-bench
nvzm123 Sep 1, 2026
edcd00d
Add PyLucene artifact and formatting checks
nvzm123 Sep 1, 2026
7816d6f
Document PyLucene GPU test workflow
nvzm123 Sep 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ repos:
name: spotless-fmt
entry: ci/checks/run_spotless.sh
pass_filenames: false
files: ^java/(cuvs-java|cuvs-lucene)/([^/]+/)?src/.*\.java$
files: ^(java/(cuvs-java|cuvs-lucene)/([^/]+/)?src/.*|python/cuvs_bench/(cuvs_bench/backends/_java|tests/java)/.*)\.java$
exclude: .*/panama/.*
language: script
verbose: true
Expand Down
13 changes: 9 additions & 4 deletions ci/checks/run_spotless.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

# pre-commit hook wrapper that runs 'spotless:apply' to format the Java sources of every Maven
# project under java/.
# pre-commit hook wrapper that runs 'spotless:apply' for the Java sources owned by the Maven
# projects under java/ and the Java adapters owned by cuvs-bench.
#
# Most cuvs contributors do not work on the Java client and do not have Maven installed. For them,
# running 'pre-commit run --all-files' matches every Java source file in the repo regardless of
Expand All @@ -15,11 +15,15 @@ set -euo pipefail

# Keep these in sync with the spotless-fmt hook's 'files'/'exclude' entries in
# .pre-commit-config.yaml.
JAVA_SRC_PATTERN='^java/(cuvs-java|cuvs-lucene)/([^/]+/)?src/.*\.java$'
JAVA_SRC_PATTERN='^(java/(cuvs-java|cuvs-lucene)/([^/]+/)?src/.*|python/cuvs_bench/(cuvs_bench/backends/_java|tests/java)/.*)\.java$'
JAVA_SRC_EXCLUDE='.*/panama/.*'

java_sources_modified() {
git status --porcelain --untracked-files=all -- java/cuvs-java java/cuvs-lucene |
git status --porcelain --untracked-files=all -- \
java/cuvs-java \
java/cuvs-lucene \
python/cuvs_bench/cuvs_bench/backends/_java \
python/cuvs_bench/tests/java |
cut -c4- |
grep -Ev "${JAVA_SRC_EXCLUDE}" |
grep -Eq "${JAVA_SRC_PATTERN}"
Expand All @@ -43,6 +47,7 @@ POMS=(
java/cuvs-lucene/pom.xml
java/cuvs-lucene/bench/pom.xml
java/cuvs-lucene/examples/pom.xml
python/cuvs_bench/java-format-pom.xml
)

for pom in "${POMS[@]}"; do
Expand Down
5 changes: 5 additions & 0 deletions conda/recipes/cuvs-bench/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,12 @@ requirements:
tests:
- package_contents:
files:
- site-packages/cuvs_bench/backends/_java/PyLuceneConfiguredHnswCodec.java
- site-packages/cuvs_bench/config/algos/pylucene_cuvs_cagra.yaml
- site-packages/cuvs_bench/config/algos/pylucene_cuvs_hnsw.yaml
- site-packages/cuvs_bench/config/datasets/datasets.yaml
- script:
- python -c "import importlib.metadata as metadata; paths = {path.as_posix() for path in (metadata.files('cuvs-bench') or ())}; required = {'cuvs_bench/backends/_java/PyLuceneConfiguredHnswCodec.java', 'cuvs_bench/config/algos/pylucene_cuvs_cagra.yaml', 'cuvs_bench/config/algos/pylucene_cuvs_hnsw.yaml'}; missing = required - paths; forbidden = sorted(path for path in paths if '/tests/java/' in '/' + path or 'PyLuceneTestSupport' in path or path.endswith('.class')); assert not missing, f'missing cuvs-bench package resources: {sorted(missing)}'; assert not forbidden, f'forbidden cuvs-bench package payload: {forbidden}'"
- python:
imports:
- cuvs_bench
Expand Down
1 change: 1 addition & 0 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,7 @@ dependencies:
packages:
- click
- cuvs==26.10.*,>=0.0.0a0
- h5py>=3.8.0
- pandas
- pyyaml
- requests
Expand Down
2 changes: 2 additions & 0 deletions fern/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ navigation:
path: "./pages/cuvs_bench/synthesize_dataset.md"
- page: "Backends"
path: "./pages/cuvs_bench/pluggable_backend.md"
- page: "PyLucene Backend"
path: "./pages/cuvs_bench/pylucene_backend.md"
- page: "cuVS Bench Parameter Tuning Guide"
hidden: true
path: "./pages/cuvs_bench/param_tuning.md"
Expand Down
1 change: 1 addition & 0 deletions fern/pages/cuvs_bench/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ Use these guides to install cuVS Bench, run benchmark workloads, prepare dataset
- [Usage](/user-guide/benchmarking-guide/cu-vs-bench-tool/usage): configure algorithms, run benchmarks, and inspect results.
- [Datasets](/user-guide/benchmarking-guide/cu-vs-bench-tool/datasets): prepare benchmark datasets, ground truth, and dataset descriptors.
- [Backends](/user-guide/benchmarking-guide/cu-vs-bench-tool/backends): understand and extend cuVS Bench backend integrations.
- [PyLucene Backend](/user-guide/benchmarking-guide/cu-vs-bench-tool/pylucene-backend): prepare the PyLucene runtime and run cuVS-Lucene HNSW and CAGRA benchmarks.
6 changes: 6 additions & 0 deletions fern/pages/cuvs_bench/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ Exact tags are listed on Docker Hub:

**Note:** GPU containers use the CUDA toolkit inside the container. The host only needs a compatible driver, so CUDA 12 containers can run on systems with CUDA 13.x-capable drivers. GPU access also requires the NVIDIA Docker runtime from the [NVIDIA Container Toolkit](https://github.com/NVIDIA/nvidia-docker).

## PyLucene backend prerequisites

The optional `pylucene` backend requires runtime components that the standard cuVS Bench packages do not install automatically: JDK 22, a source-built PyLucene wrapper for Lucene 10.2.0, and version-matched cuVS Java, cuVS-Lucene, and native artifacts.

See [PyLucene Backend](/user-guide/benchmarking-guide/cu-vs-bench-tool/pylucene-backend) for the pinned dependency build, validation procedure, runtime configuration, and benchmark workflows.

## Build from Source

Build cuVS Bench from source when you need local benchmark executables that match a development checkout, include custom algorithm targets, or use dependencies that are not available in the pre-built packages.
Expand Down
2 changes: 2 additions & 0 deletions fern/pages/cuvs_bench/param_tuning.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ Use FAISS IVF-PQ index on CPU

## HNSW

The PyLucene accelerated HNSW path has backend-specific parameter mappings and runtime constraints. See [PyLucene Backend](/user-guide/benchmarking-guide/cu-vs-bench-tool/pylucene-backend#configure-hnsw-benchmarks) for its `m`, `ef_construction`, `direct_single_segment`, and `num_candidates` settings.

### cuvs_hnsw

NVIDIA cuVS HNSW constructs a CAGRA graph on the GPU and converts it to an HNSW index for CPU-based search. The build process uses in-memory CAGRA if the estimated memory requirements fit within available host and GPU memory. If not, it falls back to ACE (Augmented Core Extraction), which enables construction for larger datasets by partitioning them. Explicitly setting ACE parameters also triggers the ACE build path. The ACE-specific parameters listed below are relevant only when ACE is being used.
Expand Down
10 changes: 7 additions & 3 deletions fern/pages/cuvs_bench/pluggable_backend.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ class ElasticsearchBackend(BenchmarkBackend):
dry_run=False,
):
n_queries = dataset.n_queries
return SearchResult(
return [SearchResult(
neighbors=np.zeros((n_queries, k), dtype=np.int64),
distances=np.zeros((n_queries, k), dtype=np.float32),
search_time_ms=0.0,
Expand All @@ -203,7 +203,7 @@ class ElasticsearchBackend(BenchmarkBackend):
algorithm=self.algo,
search_params=indexes[0].search_params if indexes else [],
success=True,
)
)]
```

```python
Expand All @@ -219,9 +219,13 @@ get_registry().register("elasticsearch", ElasticsearchBackend)
| Component | Description |
| --- | --- |
| `ConfigLoader` | Abstract class whose `load(**kwargs)` method returns `(DatasetConfig, List[BenchmarkConfig])`. Register with `register_config_loader(backend_type, loader_class)`. |
| `BenchmarkBackend` | Abstract class whose `build(...)` method returns `BuildResult` and whose `search(...)` method returns `SearchResult`. Register with `BackendRegistry.register(name, backend_class)`. |
| `BenchmarkBackend` | Abstract class whose `build(...)` method returns `BuildResult` and whose `search(...)` method returns `List[SearchResult]`. Register with `BackendRegistry.register(name, backend_class)`. |
| `BackendRegistry` | Singleton registry returned by `get_registry()`. It maps backend type names to backend classes. |

## PyLucene Backend

The built-in `pylucene` loader expands algorithm YAML groups into one Lucene index per selected codec. The backend initializes PyLucene's process-global JVM and resolves the production `Lucene101AcceleratedHNSWCodec` and `CuVS2510GPUSearchCodec` through Lucene's service-provider interface. See [PyLucene Backend](/user-guide/benchmarking-guide/cu-vs-bench-tool/pylucene-backend) for codec behavior, dependency setup, configuration, benchmark parameters, and runtime limits.

## C++ Backend

The built-in `CppGoogleBenchmarkBackend` uses `backend_type="cpp_gbench"`. Its config loader reads YAML under `config/datasets` and `config/algos`, expands parameter combinations, and validates constraints. Its backend runs the C++ benchmark executables and merges their results.
Expand Down
Loading
Loading