Initial cut for a cuVS Java API#450
Conversation
Co-authored-by: Vivek Narang <vivek@searchscale.com>
|
FYI @cjnolet ^ |
|
/ok to test |
2cfab29 to
1597158
Compare
|
@naramgvivek10 Let's move CuVSResources to the cuvs package instead of common? That way we can abstract out the internals of Panama out of sight of the users. |
* Update CI script to update version in pom.xml files * Add and update examples * Add GPU info API methods --------- Co-authored-by: Vivek Narang <vivek@searchscale.com>
|
/ok to test |
There was a problem hiding this comment.
I skimmed the packaging details at @cjnolet's request. There are some merge conflicts with #593. I will push a couple small packaging-related changes to this PR to help it move along. I do not have power to push to this fork, so I can't help here. Please merge in branch-25.02 and run pre-commit.
The biggest work item needed on the packaging side is to clarify what versioning should look like. I think a patch version (25.02.0) is important to add here, as we often publish patch releases. Currently the update-version.sh script uses a full tag like 25.02.00 but that doesn't correspond to what the version strings look like right now. Also, we should probably normalize it to 25.02.0 (drop the extra leading zero), as we do for several packaging systems (all Python wheels are normalized, as is cuDF's Java layer). I would look at how cuDF versions its Java layer for more inspiration, which I linked in a comment.
ci/release/update-version.sh
Outdated
| # Update Java API version | ||
| sed_runner "s/VERSION=\".*\"/VERSION=\"${NEXT_FULL_TAG}\"/g" java/build.sh | ||
| for FILE in java/*/pom.xml; do | ||
| sed_runner "/<!--CUVS_JAVA#VERSION_UPDATE_MARKER_START-->.*<!--CUVS_JAVA#VERSION_UPDATE_MARKER_END-->/s//<!--CUVS_JAVA#VERSION_UPDATE_MARKER_START--><version>${NEXT_FULL_TAG}<\/version><!--CUVS_JAVA#VERSION_UPDATE_MARKER_END-->/g" "${FILE}" |
There was a problem hiding this comment.
This is currently inconsistent with our normal use of the script. We usually run ./ci/release/update-version.sh 25.02.00 which would assign a value of 25.02.00. However, the pom.xml files use 25.02 without the patch version. I would guess that we do want to have a patch version here, but perhaps we want to normalize it to 25.02.0. That's close to what we do in cuDF's Java code.
Please look at https://github.com/rapidsai/cudf/blob/133e0c869531af94474e0bbb66cb22c5f8ba80f2/ci/release/update-version.sh#L87-L91 and https://github.com/rapidsai/cudf/blob/133e0c869531af94474e0bbb66cb22c5f8ba80f2/java/pom.xml#L24 and see whether we should adopt the same patterns here.
There was a problem hiding this comment.
Thanks Bradley, I've updated the version number format to include a patch number also. This should be better for Java artifacts.
There was a problem hiding this comment.
Hey @bdice I will update the versioning following your suggestion above and push this change soon.
java/README.md
Outdated
| Building | ||
| -------- | ||
|
|
||
| `./build.sh` will generate the libcuvs_java.so file in internal/ directory, and then build the final jar file for the cuVS Java API in cuvs-java/ directory. |
There was a problem hiding this comment.
| `./build.sh` will generate the libcuvs_java.so file in internal/ directory, and then build the final jar file for the cuVS Java API in cuvs-java/ directory. | |
| `./build.sh` will generate the `libcuvs_java.so` file in the `internal/` directory, and then build the final jar file for the cuVS Java API in the `cuvs-java/` directory. |
… making version include a patch number, ability for .so to be loaded off env var
|
I updated the branch by merging latest branch-25.02 changes. Needed to add a filter param to cagra search (#452). FYI @narangvivek10, please take a look. |
|
(FYI @ChrisHegarty, @narangvivek10), Last working commit in this branch is: Author: Vivek Narang <123010842+narangvivek10@users.noreply.github.com>
Date: Fri Jan 24 14:45:44 2025 -0500
Add examples, update GPU info API methods, and update CI script
* Update CI script to update version in pom.xml files
* Add and update examples
* Add GPU info API methods
---------
Co-authored-by: Vivek Narang <vivek@searchscale.com> |
|
/ok to test |
1 similar comment
|
/ok to test |
build.sh
Outdated
| # Build the cuvs Java bindings | ||
| if (( ${NUMARGS} == 0 )) || hasArg java; then | ||
| # build libcuvs first as the Java API depends on it | ||
| ./$0 libcuvs |
There was a problem hiding this comment.
I'm not sure if it is good practice to call this script recursively to build the C++ code. It seems like it will lead to unexpected behavior. For example, how do you ensure that the CLI arguments such as --allgpuarch or --no-mg are being passed through?
I would recommend removing this line, and users must call ./build.sh libcuvs java if the C++ has not yet been built. Perhaps a warning can be issued if hasArg libcuvs is false. I believe this is how we handle the Python builds, which also depend on C++ libraries being built.
| ./$0 libcuvs |
There was a problem hiding this comment.
Please revert any files with only copyright changes.
ci/release/update-version.sh
Outdated
| # Update Java API version | ||
| sed_runner "s/VERSION=\".*\"/VERSION=\"${NEXT_FULL_TAG}\"/g" java/build.sh | ||
| for FILE in java/*/pom.xml; do | ||
| sed_runner "/<!--CUVS_JAVA#VERSION_UPDATE_MARKER_START-->.*<!--CUVS_JAVA#VERSION_UPDATE_MARKER_END-->/s//<!--CUVS_JAVA#VERSION_UPDATE_MARKER_START--><version>${NEXT_FULL_TAG}<\/version><!--CUVS_JAVA#VERSION_UPDATE_MARKER_END-->/g" "${FILE}" |
|
/ok to test |
|
/ok to test |
1 similar comment
|
/ok to test |
|
@bdice the devcontainer build seems to be complaining about This is the log for the devcontainer: https://github.com/rapidsai/cuvs/actions/runs/13024175979/job/36330368363?pr=450. |
|
/ok to test |
msarahan
left a comment
There was a problem hiding this comment.
Minor comment. You may want to run shellcheck on your .sh scripts. Mostly pedantic, but sometimes it catches annoying bugs.
A Java API for cuVS for easy integration into Apache Lucene or other Java based projects.
Try:
For generating docs,
mvn javadoc:javadocPrerequisites:
Todo: