Repository navigation
Conversation
_retrieve_from_online_store_v2 grouped the ranked documents by unique entity, which sorts the entities, while the entity columns stayed in ranked order. Whenever a store ranked documents out of entity-key order, each entity was returned with another entity's features, and a second hit for the same entity was dropped. Treat each document as its own output row instead. Signed-off-by: haoxu0 <20422210+haoxu0@users.noreply.github.com>
Stores one Lance dataset per feature view with one row per entity key. Supports point reads, upserts that never roll a value back, vector search with metadata prefilters, full-text search, and in-place schema evolution on feast apply. Signed-off-by: haoxu0 <20422210+haoxu0@users.noreply.github.com>
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7030 +/- ##
==========================================
+ Coverage 50.98% 51.21% +0.22%
==========================================
Files 455 456 +1
Lines 56964 57269 +305
Branches 8313 8375 +62
==========================================
+ Hits 29044 29328 +284
- Misses 25935 25948 +13
- Partials 1985 1993 +8
... and 3 files with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
Before: Lance could be used as an offline source, but there was no way to serve features or run vector search from Lance.
After:
online_store: {type: lance}keeps one Lance dataset per feature view, one row per entity key, on local disk or object storage. It supports:retrieve_online_documents_v2, with metadata filters applied before ranking;Stringfeatures (text_search_enabled: true);feast apply: added features become empty columns and removed features are dropped, so the values of unchanged features are kept. A changed feature type recreates the dataset empty.How: each feature is stored as a serialized
ValueProtofor exact round-trips. Scalar primitives,Stringfeatures and the vector field also get native columns, so filters, full-text and nearest-neighbour search run inside Lance's scanner. The entity key carries a BTREE index.Depends on #7029: the end-to-end test asserts that features stay with their own entity in ranked order. This branch contains that commit; review only the last commit.
Which issue(s) this PR fixes:
Checks
git commit -s)Testing Strategy
39 unit tests in
tests/unit/infra/online_store/test_lance_online_store.py, including one end-to-end test throughFeatureStore(apply,write_to_online_store,get_online_features,retrieve_online_documents_v2with a filter). Docs:docs/reference/online-stores/lance.md.Misc
Rough local numbers at 100k rows: point read of 1 key about 12 ms, 100 keys about 23 ms; unindexed top-10 vector search about 8 ms. Follow-ups: cache the opened dataset between reads, ANN index creation, hybrid search.