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

Dynamic type support for ParquetDenseVectorDocumentGenerator #2667

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

b8zhong
Copy link
Contributor

@b8zhong b8zhong commented Dec 22, 2024

To solve issue #2662

Not done (nor do I have tests yet!). But let me know what you think of this @lintool

@lintool
Copy link
Member

lintool commented Dec 22, 2024

No, I don't think you're doing it at the best place... I was thinking in ParquetDenseVectorCollection somewhere here:
https://github.com/castorini/anserini/blob/master/src/main/java/io/anserini/collection/ParquetDenseVectorCollection.java#L166

i.e., at the point you're reading in the data from the file.

@b8zhong
Copy link
Contributor Author

b8zhong commented Dec 23, 2024

Ohh - got it that makes sense. Will update

- Modified collection to handle both float and double vectors

- Added type detection using Parquet schema

- Added comprehensive tests for float/double handling and edge cases
@lintool
Copy link
Member

lintool commented Dec 25, 2024

We have a test failure here?

We currently have src/test/resources/sample_docs/parquet/msmarco-passage-bge-base-en-v1.5.parquet - what about a test cases where we have a variant of the parquet file stored as floats, and we make sure both work?

@vincent-4
Copy link
Contributor

Updated the test format to use the same structure as previously– (in the two files below)
With new entries in:

src/test/java/io/anserini/index/IndexFlatDenseVectorsTest.java
src/test/java/io/anserini/index/IndexHnswDenseVectorsTest.java

And added a new, converted parquet file (floats) in the path (used by the new tests): src/test/resources/sample_docs/parquet/msmarco-passage-bge-base-en-v1.5.parquet-float/test1.parquet

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

Successfully merging this pull request may close these issues.

4 participants