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

Add a CI job to generate backwards compatibility test indexes and a python unit test to query them #206

Merged
merged 36 commits into from
Jan 23, 2024

Conversation

jparismorgan
Copy link
Contributor

What

Here we add:

  • A new siftmicro_base.fvecs file which just contains the first 100 vectors from siftsmall_base.fvecs.
    • The input data is 100 vectors, each with 5 dimensions.
    • We will index float32 and uint8 versions of the input data with all available index types (Flat and IVFFlat today).
  • A script which will generate indices using the current version of the engine and place them in backwards-compatibility-data/data/x.x.x. This is the proposed naming structure:
/TileDB-Vector-Search/backwards-compability-data/0.0.19/flat_f32
/TileDB-Vector-Search/backwards-compability-data/0.0.19/flat_u8
/TileDB-Vector-Search/backwards-compability-data/0.0.19/ivf_flat_f32
/TileDB-Vector-Search/backwards-compability-data/0.0.19/ivf_flat_u8
  • A new CI job in the release process which will run this script and commit + push these indices to main.
  • A Python unit test which will read all indices in backwards-compatibility-data/data and verify we can query them.

Testing

In this job https://github.com/TileDB-Inc/TileDB-Vector-Search/actions/runs/7558031052/job/20578613117 I tested running this and pushing to jparismorgan/temp-testing-2. You can see we make one commit to jparismorgan/temp-testing-2 with the new indices: https://github.com/TileDB-Inc/TileDB-Vector-Search/commits/jparismorgan/temp-testing-2/. I then downloaded these indices and ran test_backwards_compatibility.py locally and it passed:

(TileDB-Vector-Search-2) ~/repo/TileDB-Vector-Search-2/apis/python pytest test/test_backwards_compatibility.py -s
================================= test session starts =================================
platform darwin -- Python 3.9.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /Users/parismorgan/repo/TileDB-Vector-Search-2/apis/python
collected 1 item                                                                      

test/test_backwards_compatibility.py datasets_path /Users/parismorgan/repo/TileDB-Vector-Search-2/apis/python/test/../../../backwards-compatibility-data/data

Checking version_path /Users/parismorgan/repo/TileDB-Vector-Search-2/apis/python/test/../../../backwards-compatibility-data/data/0.0.0
Skipping because this version had relative paths in it

Checking version_path /Users/parismorgan/repo/TileDB-Vector-Search-2/apis/python/test/../../../backwards-compatibility-data/data/0.0.1
Testing index_uri /Users/parismorgan/repo/TileDB-Vector-Search-2/apis/python/test/../../../backwards-compatibility-data/data/0.0.1/flat_uint8
Testing index_uri /Users/parismorgan/repo/TileDB-Vector-Search-2/apis/python/test/../../../backwards-compatibility-data/data/0.0.1/ivf_flat_float32
Testing index_uri /Users/parismorgan/repo/TileDB-Vector-Search-2/apis/python/test/../../../backwards-compatibility-data/data/0.0.1/flat_float32
Testing index_uri /Users/parismorgan/repo/TileDB-Vector-Search-2/apis/python/test/../../../backwards-compatibility-data/data/0.0.1/ivf_flat_uint8
.

================================== 1 passed in 0.31s ==================================

TODO

I have not yet tested in real release, so I didn't make the CI job a prerequisite for build_wheels, but once it's tested it seems like a good thing to do.

@jparismorgan jparismorgan marked this pull request as ready for review January 19, 2024 14:02
@jparismorgan jparismorgan merged commit 3903216 into main Jan 23, 2024
5 checks passed
@jparismorgan jparismorgan deleted the jparismorgan/backwards-compat branch January 23, 2024 13:47
jparismorgan added a commit that referenced this pull request Feb 12, 2024
jparismorgan added a commit that referenced this pull request Feb 12, 2024
jparismorgan added a commit that referenced this pull request Feb 12, 2024
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.

2 participants