Add PyLucene integration and CPU/GPU end-to-end tests - #2475
Open
nvzm123 wants to merge 13 commits into
Open
Conversation
Co-authored-by: Corey J. Nolet <cjnolet@gmail.com> Signed-off-by: Zack Meeks <zmeeks@nvidia.com>
This was referenced Aug 17, 2026
nvzm123
added a commit
to nvzm123/cuvs
that referenced
this pull request
Aug 19, 2026
Use cuVS PR NVIDIA#2475 as the pinned source for matching native, cuvs-java, and cuvs-lucene artifacts. Refresh monorepo paths, validation commands, and adapter compatibility guidance. Signed-off-by: nvzm123 <zmeeks@nvidia.com>
Signed-off-by: Zack Meeks <zmeeks@nvidia.com>
nvzm123
marked this pull request as ready for review
August 20, 2026 04:05
cjnolet
reviewed
Aug 21, 2026
cjnolet
reviewed
Aug 21, 2026
cjnolet
reviewed
Aug 21, 2026
cjnolet
requested changes
Aug 21, 2026
cjnolet
left a comment
Contributor
There was a problem hiding this comment.
This still needs some work.
nvzm123
marked this pull request as draft
August 24, 2026 23:09
Signed-off-by: nvzm123 <zmeeks@nvidia.com>
nvzm123
marked this pull request as ready for review
September 10, 2026 06:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This ports the cuVS-Lucene production changes from NVIDIA/cuvs-lucene#174 into
java/cuvs-luceneafter the project moved into the cuVS monorepo.The port:
Lucene101AcceleratedHNSWCodecSPI name;Lucene101Codecas the accelerated codecs' explicit delegate;cuvs-java, and test-only PyLucene support are not bundled.While reconciling the port with current
main, the branch retained PR #2483's conditional padded-dataset selection for both aligned and unaligned CAGRA serialization. The writer and its aligned-dimension regression test have no net diff from currentmain.The PyLucene pytest suite and its test-only Java adapters are owned by the cuVS Bench backend in NVIDIA/cuvs#2385, not by the production
cuvs-luceneartifact. The standard thincuvs-luceneJAR remains the artifact under test; Lucene and the basecuvs-javaJAR remain external classpath dependencies.Apache does not publish PyLucene 10.2.0, so end-to-end validation uses a custom PyLucene wrapper generated against the same Lucene 10.2.0 sources as this project.
Test coverage
The in-tree Java coverage adds or strengthens:
verify.The dependent pytest matrix in #2385 proves these execution paths:
GPU-required cases assert the concrete accelerated writer, reader, and query implementations and fail on unavailable cuVS or CPU fallback. CPU cases explicitly verify a stock Lucene HNSW path.
The matrix covers a single live document, one and ten segments, 10-to-1 and 100-to-10 force merges, CAGRA
searchWidthvalues 1, 16, and 32, deletions, vectorless documents, selective filters, persisted HNSW graph degree/layers, exact filtered search, and deterministic brute-force recall. Assertions check rank-one self matches where applicable, exact hit counts, duplicate exclusion, inactive/filter-rejected document exclusion, and configurable recall floors. It also covers CAGRA-built HNSW search withtop_k=2000andnum_candidates=2500; direct CAGRA search retains its supportedk <= 1024boundary.Warning-free CAGRA cases use
graphDegree=32,intermediateGraphDegree=64, and enough vectors to avoid graph-parameter clamping, including 24,832 vectors for the three-layer case.Validation
Final revisions:
57ce4920374dce1cecd09091566b18710fe01c82e54979c3b5aba2f53a77720f7ebc3dd0e16618faValidated on an NVIDIA A10G with JDK 22 and Lucene/PyLucene 10.2. The GPU run used the official RAPIDS 26.12 development nightly
libcuvs 26.12.00a8(cuda12_260910004918_29e1101b), built from the testedmainrevision29e1101bmerged into both branches. The runtime reported cuVS 26.12.0 and used the RMM 26.12 ABI; thecuvs-javaandcuvs-lucene26.12.0 JARs were rebuilt from the merged producer branch.After that full run, PR #2475 merged current
main(ef29c4cfd53082d31c1fc05ec35251c835120efa) in57ce4920374dce1cecd09091566b18710fe01c82. That merge adds only the four upstream CMake dependency-discovery changes and leaves the validated Java, cuvs-lucene, PyLucene, and test inputs unchanged;git diff --checkpassed, and the GPU suite was not redundantly rerun.Producer validation
cuvs-javaandcuvs-luceneMaven suites: 497 tests, 0 failures, 0 errors, 29 skipped (cuvs-java: 112 with 1 skipped;cuvs-lucene: 385 with 28 skipped, including both passingThinJarContentsITcases)Dependent cuVS Bench validation
python -m pytest -q -s cuvs_bench/tests/pylucene --run-pylucene: 393 passed in 55.05 secondsThe Java suites exercised the native GPU paths and emitted no version-mismatch or linkage errors. Their inherited randomized and small-dataset cases emitted native cuVS graph-parameter diagnostics (271 warning lines from
cuvs-javaand 2,651 fromcuvs-lucene). The PyLucene suite emitted no cuVS configuration or CPU-fallback warnings; it emitted the expected JVM notice for the incubating vector module.Baseline randomized-test failure observed during validation
An unseeded full Maven run selected seed
CC0EA94328BAB3E5and failed inTestCuVSVectorsFormat.testRandomWithUpdatesAndGraphwithIllegalStateException: Index not found for field:field. This exact seed and failure signature were first recorded during NVIDIA/cuvs-lucene#174 validation on August 17, 2026; no earlier public issue tracking this exact failure was found.The first commit in this port,
435c52ec, has the untouched cuVS-Lucene import0fa5ebe5as its direct parent. That baseline imported the standalone cuVS-Lucene source from61431aa, which GitHub records as #174's base commit; #174 was closed without merging when the project moved. A clean checkout of0fa5ebe5, which contains none of the port delta, reproduces the same primary and secondary seeds (CC0EA94328BAB3E5:B2D36C5E9FD11B86), exception, and stack trace. This establishes that the failure exists independently of the changes ported from #174; it does not claim that its root cause was already tracked upstream. Historical reproduction command fromjava/cuvs-lucene:mvn -q -Dtest=TestCuVSVectorsFormat#testRandomWithUpdatesAndGraph \ -Dtests.seed=CC0EA94328BAB3E5 \ -Dtests.locale=ti-Ethi-ET \ -Dtests.timezone=Greenwich testDuring the same #174 validation, a separate full run pinned to seed
5A17C10120260817passed; no multi-seed sweep was run. The exact 26.12 GPU-enabled Maven run at the current pushed head executed and passedTestCuVSVectorsFormat.testRandomWithUpdatesAndGraph. It did not rerun the historical failing seed, so this successful randomized invocation does not clear that seed-specific baseline failure.Follow-up multithreaded concurrency coverage is tracked in NVIDIA/cuvs#2407.