Skip to content

feat: Add feature view versioning support to FAISS online store#6256

Open
YassinNouh21 wants to merge 1 commit intofeast-dev:masterfrom
YassinNouh21:feat/faiss-versioning
Open

feat: Add feature view versioning support to FAISS online store#6256
YassinNouh21 wants to merge 1 commit intofeast-dev:masterfrom
YassinNouh21:feat/faiss-versioning

Conversation

@YassinNouh21
Copy link
Copy Markdown
Collaborator

@YassinNouh21 YassinNouh21 commented Apr 10, 2026

Summary

  • 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 coexist in memory
  • Refactored singleton _index/_in_memory_store to per-table dictionaries (_indices/_in_memory_stores)
  • Reuses shared compute_table_id() from helpers.py for consistency with PostgreSQL and MySQL stores (feat: Add feature view versioning support to PostgreSQL and MySQL online stores #6193)
  • Registered FaissOnlineStore in _check_versioned_read_support() gate

What 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 raised VersionedOnlineReadNotSupported when 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):

  • Write path: when enable_online_feature_view_versioning is enabled, _table_id appends a _v{N} suffix to the in-memory key namespace, routing materialization to the correct versioned index
  • Read path: version-qualified lookups (@v2) set projection.version_tag on the feature view; _table_id picks this up and routes to the correct index. projection.version_tag takes priority over current_version_number
  • Multi-table support: replaced single class-level _index/_in_memory_store with per-table _indices/_in_memory_stores dicts
  • Gate: _check_versioned_read_support in online_store.py now allows FaissOnlineStore through

Which issue(s) this PR fixes

Part of #2728

Checks

  • I've made sure the tests are passing.
  • My commits are signed off (git commit -s)
  • My PR title follows conventional commits format

Testing Strategy

  • Unit tests
  • Integration tests
  • Manual tests
  • Testing is not required for this change

Added 16 unit tests covering _table_id with versioning disabled/enabled, projection.version_tag priority over current_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.


Open with Devin

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>
@YassinNouh21 YassinNouh21 requested review from a team as code owners April 10, 2026 10:24
@YassinNouh21 YassinNouh21 requested review from dmartinol, ejscribner and tokoko and removed request for a team April 10, 2026 10:24
@YassinNouh21 YassinNouh21 self-assigned this Apr 10, 2026
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 5 additional findings.

Open in Devin Review

@YassinNouh21 YassinNouh21 requested review from ntkathole and removed request for dmartinol, ejscribner and tokoko April 10, 2026 12:53
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.

Add feature view versioning support to Faiss online store

1 participant