Move Java example projects under examples/java/ - #2543
Conversation
Move java/examples and java/cuvs-lucene/examples to examples/java/cuvs-java and examples/java/cuvs-lucene, matching the existing examples for C, C++ and Go. Add a --build-java-examples flag to build.sh, java/build.sh, and java/cuvs-lucene/build.sh that compiles the examples against the jar just built, and wire it into ci/build_java.sh/ci/build_lucene.sh so CI catches drift between the examples and the cuvs-java/cuvs-lucene API. Fix the examples themselves, which had silently drifted from the current API (builder signatures now require CuVSResources, destroyIndex() -> close(), CagraQuery needs a CuVSMatrix, and CAGRA search now requires an explicit device-padded dataset). Closes NVIDIA#2448 Closes NVIDIA#2542
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
/ok to test c01744c |
jameslamb
left a comment
There was a problem hiding this comment.
approved with a minor suggestion
| - 'examples/build.sh' | ||
| - 'examples/c/**' | ||
| - 'examples/cmake/**' | ||
| - 'examples/cpp/**' |
There was a problem hiding this comment.
| - 'examples/cpp/**' | |
| - '!examples/.gitignore' | |
| - '!examples/java' |
I think it's be a bit simpler to keep these list as only exclusions (!) instead of mixing inclusions and exclusions. In my opinion, that makes them easier to reason about. Could you apply similar changes through the rest of the changed-files diff in this PR please?
| index.close(); | ||
| hnswIndex.close(); |
There was a problem hiding this comment.
Yikes, thank you for fixing this. We should have done that when we fixed #1252. Sorry I missed that.
mythrocks
left a comment
There was a problem hiding this comment.
👍 Thank you, this is much more streamlined.
Move java/examples and java/cuvs-lucene/examples to examples/java/cuvs-java and examples/java/cuvs-lucene, matching the existing examples for C, C++ and Go.
Add a --build-java-examples flag to build.sh, java/build.sh, and java/cuvs-lucene/build.sh that compiles the examples against the jar just built, and wire it into ci/build_java.sh/ci/build_lucene.sh so CI catches drift between the examples and the cuvs-java/cuvs-lucene API. Fix the examples themselves, which had silently drifted from the current API (builder signatures now require CuVSResources, destroyIndex() -> close(), CagraQuery needs a CuVSMatrix, and CAGRA search now requires an explicit device-padded dataset).
Closes #2448
Closes #2542