Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forward-merge branch-25.02 into branch-25.04 #657

Open
wants to merge 12 commits into
base: branch-25.04
Choose a base branch
from

Conversation

rapids-bot[bot]
Copy link

@rapids-bot rapids-bot bot commented Feb 5, 2025

Forward-merge triggered by push to branch-25.02 that creates a PR to keep branch-25.04 up-to-date. If this PR is unable to be immediately merged due to conflicts, it will remain open for the team to manually merge. See forward-merger docs for more info.

Enables telemetry during CUVS CI runs.  This is done by parsing GitHub Actions run log metadata and should have no impact on build or test times.

xref rapidsai/build-infra#139

Authors:
  - Gil Forsyth (https://github.com/gforsyth)

Approvers:
  - Mike Sarahan (https://github.com/msarahan)
  - Corey J. Nolet (https://github.com/cjnolet)

URL: #652
@rapids-bot rapids-bot bot requested a review from a team as a code owner February 5, 2025 13:51
@rapids-bot rapids-bot bot requested a review from AyodeAwe February 5, 2025 13:51
Copy link
Author

rapids-bot bot commented Feb 5, 2025

FAILURE - Unable to forward-merge due to an error, manual merge is necessary. Do not use the Resolve conflicts option in this PR, follow these instructions https://docs.rapids.ai/maintainers/forward-merger/

IMPORTANT: When merging this PR, do not use the auto-merger (i.e. the /merge comment). Instead, an admin must manually merge by changing the merging strategy to Create a Merge Commit. Otherwise, history will be lost and the branches become incompatible.

This change reworks the api to allow it to be used with Java 21. The implementation is moved to an internal package, compiled with JDK 22, and packaged as an mrjar. The benefit of this structure is that the api can be used in environments that compile to a minimum of Java 21, but run on more recent JDKs like 22 and 23 - which is exactly what Elasticsearch and Lucene do.  In fact, a minimum compilation target of Java 21 is common, since 21, at the time of writing, is the most recent LTS Java release.

The most significant change is that the non-trivial api types are now, for the most part, interfaces. Instance can be created by one of the factory methods, which lookup an spi to find the implementation. If on a release greater than Java 21, then a functioning implementation is returned. Otherwise, a no-op implementation is returned. This is a reasonably standard way for a Java api to behave, and allows the developer to handle the case where the platform does not have a functioning implementation. 

This change also refactors the native downcall method handles so that they are static final constants - which optimise better by the JVM. It's also the generally accepted pattern, where the handles are tied to the lifetime of class which effectively mediates access - by virtue of reachability.

Another thing that I added is the ability to programmatically set the temporary directory used for intermediate operations - this is important to how both Lucene and Elasticsearch work - since they commonly only have permission to write to certain parts of the disk.

Additionally,
1. the error codes from native calls are plumbed in and checked. As well as `cuvsGetLastErrorText`.
2. a state is added to any classes that hold a reference to native resources that could be released.
3. a local arena is used for memory allocation only needed per downcall invocation, e.g. the return value.
4. I moved the tests to be integration tests, since they need to run on the jar (rather than the exploded classes). They can be run by any of; `mvn verify`, or `mvn integration-test`, or `mvn -Dit.test="*Hnsw*" verify`
5. I refactored the entry-points to the api to be static methods and added an `spi` layer. You can see the minimal impact on the tests.
6. Move the native library out of the top-level directory in the jar and into an os/arch position in the META-INF. 
7. add service provider support for custom implementations.

Authors:
  - Chris Hegarty (https://github.com/ChrisHegarty)

Approvers:
  - Corey J. Nolet (https://github.com/cjnolet)

URL: #628
@rapids-bot rapids-bot bot requested a review from a team as a code owner February 6, 2025 02:48
divyegala and others added 3 commits February 6, 2025 05:07
Authors:
  - Divye Gala (https://github.com/divyegala)
  - Corey J. Nolet (https://github.com/cjnolet)

Approvers:
  - Tamas Bela Feher (https://github.com/tfeher)
  - Corey J. Nolet (https://github.com/cjnolet)

URL: #616
The ann-bench tool has been observed to deadlock on thread.join() due to unnecessary mutex lock.
The problem is that the destructor doesn't release the thread mutex and thus doesn't allow the thread to escape the condition_variable.wait() function.
The fix is to just remove the lock in the destructor (which doesn't modify the state of the task anyway).

Authors:
  - Artem M. Chirkin (https://github.com/achirkin)

Approvers:
  - Tamas Bela Feher (https://github.com/tfeher)

URL: #667
This PR adds a Go API. It's far from completion and still work in progress. Feel free to suggest improvements!

Authors:
  - Ajit Mistry (https://github.com/ajit283)
  - Corey J. Nolet (https://github.com/cjnolet)
  - Ben Frederickson (https://github.com/benfred)

Approvers:
  - Ben Frederickson (https://github.com/benfred)
  - Gil Forsyth (https://github.com/gforsyth)

URL: #212
@rapids-bot rapids-bot bot requested a review from a team as a code owner February 6, 2025 20:57
@github-actions github-actions bot added the ci label Feb 6, 2025
rhdong and others added 2 commits February 6, 2025 21:10
This PR adds docs for cuvs nn_descent

Authors:
  - Severin Dicks (https://github.com/Intron7)

Approvers:
  - Corey J. Nolet (https://github.com/cjnolet)

URL: #668
@rapids-bot rapids-bot bot requested a review from a team as a code owner February 6, 2025 21:39
achirkin and others added 3 commits February 7, 2025 14:24
… copy beyond 4B elems (#671)

ann-bench keeps data dimensions as `uint32_t`. We use `std::fread` to copy the data from a file to the host memory and pass `n_rows * n_cols` there, which gets casted to size_t only after the multiplication. This leads to integer overflow for the datasets larger than 4B elements and a partial data copy.

This PR fixes the bug by casting the dimensions before the multiplication.
The bug only affects the benchmark cases where the data is requested in the host memory not backed by a file.

Authors:
  - Artem M. Chirkin (https://github.com/achirkin)

Approvers:
  - Tamas Bela Feher (https://github.com/tfeher)

URL: #671
@rapids-bot rapids-bot bot requested a review from a team as a code owner February 7, 2025 17:39
PR does the following:

- [x] Modifies CI to run pytest and e2e test of cuvs-bench
    - [x] We need to test the additional time needed to run the tests. They should be fast, but if they are not, then we can add an additional job to run them in parallel.
- [x] Adds synthetic test-data generation so the CI jobs don't depend on downloading datasets, and users can have easy testing locally. 
    - [ ] Few improvements to be done to docs, yaml and other things to make it easy for users.
- [x] Check in some additional pytests that hadn't been checked in before.

Authors:
  - Dante Gama Dessavre (https://github.com/dantegd)
  - Corey J. Nolet (https://github.com/cjnolet)
  - Micka (https://github.com/lowener)

Approvers:
  - James Lamb (https://github.com/jameslamb)
  - Corey J. Nolet (https://github.com/cjnolet)

URL: #574
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (branch-25.04@ddf1c8f). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff               @@
##             branch-25.04     #657   +/-   ##
===============================================
  Coverage                ?   84.00%           
===============================================
  Files                   ?       18           
  Lines                   ?      125           
  Branches                ?        0           
===============================================
  Hits                    ?      105           
  Misses                  ?       20           
  Partials                ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

Successfully merging this pull request may close these issues.