You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c102738
Browse filesBrowse the repository at this point in the historyBrowse files
feat: Add Vector Search support to MongoDBOnlineStore (#6344)
* feat: add MongoDB Atlas Vector Search support to MongoDBOnlineStore
- Extend MongoDBOnlineStoreConfig with VectorStoreConfig (vector_enabled,
similarity, vector_index_wait_timeout)
- Auto-create/drop Atlas vector search indexes in update() for feature
views with vector_index=True fields
- Implement retrieve_online_documents_v2 using \ aggregation
- Add MongoDBAtlasOnlineStoreCreator using MongoDBAtlasLocalContainer
from testcontainers-python fork
- Add integration tests for index lifecycle, write+retrieve round-trip,
top_k limiting, and teardown cleanup
Signed-off-by: Casey Clements <[email protected]>
* fix: ensure collection exists before vector index creation, add INDEX_WAIT
- Explicitly create collection in _ensure_vector_indexes before calling
create_search_index (Atlas requires it to exist)
- Restructure tests to share store instance and setup via module-scoped
fixture
- Add INDEX_WAIT (default 5s) for Atlas Search eventual consistency
after writes
Signed-off-by: Casey Clements <[email protected]>
* fix: use float32 in test data and coerce query vector to native floats
- Test write_data now uses np.float32 to match Array(Float32) schema
- retrieve_online_documents_v2 coerces embedding to native Python floats
before passing to \, avoiding BSON encoding errors with
numpy float types
Signed-off-by: Casey Clements <[email protected]>
* test: add vector search validation unit tests and idempotency integration test
- Add unit tests for retrieve_online_documents_v2 error paths:
vector_enabled=False, embedding=None, no vector_index fields,
missing vector_length
- Add idempotency integration test: calling update() twice does not
duplicate indexes
- Add vector_index_wait_poll_interval config option
- Change _wait_for_index_ready to raise TimeoutError instead of
silently continuing on timeout
Signed-off-by: Casey Clements <[email protected]>
* feat: upgrade testcontainers to 4.15.0rc2 and use MongoDBAtlasLocalContainer
Replace MongoDbContainer with MongoDBAtlasLocalContainer in MongoDB
offline store unit tests. This uses the mongodb/mongodb-atlas-local
image which includes Atlas Search services, enabling future vector
search testing.
- Bump testcontainers from 4.9.0 to 4.15.0rc2
- Switch test fixture to MongoDBAtlasLocalContainer
- Simplify connection string fixture to use get_connection_url()
Signed-off-by: Casey Clements <[email protected]>
* fix: check bool before int in _python_value_to_proto
bool is a subclass of int in Python, so isinstance(True, int) returns
True. Move the bool check before int so boolean values are correctly
converted to ValueProto(bool_val=...) instead of ValueProto(int64_val=...).
Signed-off-by: Casey Clements <[email protected]>
* docs: note composite vector index as future optimization
Add docstring to _ensure_vector_indexes explaining the current
one-index-per-field design and noting that a single composite index
with multiple field definitions would reduce cluster-wide index count
and memory overhead.
Signed-off-by: Casey Clements <[email protected]>
* chore: regenerate requirement lockfiles
Run 'make lock-python-dependencies-all' to update all lockfiles
to reflect testcontainers>=4.15.0rc2 and mongodb in ci extras.
Signed-off-by: Casey Clements <[email protected]>
* -s
make lock-python-dependencies-all and pixi lock
Signed-off-by: Casey Clements <[email protected]>
* fix: add dialect=pymysql to MySqlContainer after testcontainers upgrade
The testcontainers upgrade changed the default MySQL dialect, causing
'No module named MySQLdb' errors. Explicitly set dialect='pymysql' in
all MySqlContainer instantiations.
Signed-off-by: Casey Clements <[email protected]>
---------
Signed-off-by: Casey Clements <[email protected]>
0 commit comments