feat: Add feature view versioning support to FAISS online store#6256
Open
YassinNouh21 wants to merge 1 commit intofeast-dev:masterfrom
Open
feat: Add feature view versioning support to FAISS online store#6256YassinNouh21 wants to merge 1 commit intofeast-dev:masterfrom
YassinNouh21 wants to merge 1 commit intofeast-dev:masterfrom
Conversation
When enable_online_feature_view_versioning is enabled, FAISS indices are namespaced by versioned table keys (e.g. project_driver_stats_v2) so multiple feature view versions can coexist in memory. Reuses the shared compute_table_id() from helpers.py for consistency with PostgreSQL and MySQL stores. Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
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.
Summary
enable_online_feature_view_versioningis enabled, FAISS indices are namespaced by versioned table keys (e.g.project_driver_stats_v2) so multiple feature view versions coexist in memory_index/_in_memory_storeto per-table dictionaries (_indices/_in_memory_stores)compute_table_id()fromhelpers.pyfor consistency with PostgreSQL and MySQL stores (feat: Add feature view versioning support to PostgreSQL and MySQL online stores #6193)FaissOnlineStorein_check_versioned_read_support()gateWhat this PR does / why we need it
Closes #6173
Feature view versioning was introduced in #6101, but version-qualified feature references (e.g.
driver_stats@v2:trips_today) only worked with SQLite, PostgreSQL, and MySQL online stores. All other online stores raisedVersionedOnlineReadNotSupportedwhen a versioned ref was used.This PR adds versioned read/write support to the FAISS online store, following the same pattern as the PostgreSQL/MySQL implementation (#6193):
enable_online_feature_view_versioningis enabled,_table_idappends a_v{N}suffix to the in-memory key namespace, routing materialization to the correct versioned index@v2) setprojection.version_tagon the feature view;_table_idpicks this up and routes to the correct index.projection.version_tagtakes priority overcurrent_version_number_index/_in_memory_storewith per-table_indices/_in_memory_storesdicts_check_versioned_read_supportinonline_store.pynow allowsFaissOnlineStorethroughWhich issue(s) this PR fixes
Part of #2728
Checks
git commit -s)Testing Strategy
Added 16 unit tests covering
_table_idwith versioning disabled/enabled,projection.version_tagpriority overcurrent_version_number, version 0 edge case, versioned read support gate, versioned write/read round trips, namespace isolation between versions, missing index handling, and teardown cleanup.