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

Mlops architecture to reconcile feast and vector search in the serving layer #3965

Open
boumelhaa opened this issue Feb 22, 2024 · 7 comments
Assignees
Labels
kind/question Further information is requested priority/p2

Comments

@boumelhaa
Copy link

This is not an issue. We are currently working on developing a scalable architecture for our ranking system using Feast. As a backend, we are utilizing GCP for the offline store and Redis for the online store in AWS, which is in close proximity to our serving environment.

Feast effectively abstracts the feature vectors for classical models or batch inference. However, the complexity arises when we integrate embeddings into our recommendation system.

While Feast serves well for training the embeddings model and encoding the embeddings in offline batches, the challenge lies in serving these embeddings. My question pertains to how a vector search solution fits into our architecture. Where should the embeddings reside, and do we need to register them initially?

In essence, considering our two-tower ranking model where the first tower's embeddings are encoded offline and the second tower's embeddings are encoded upon request, followed by a search against the pre-encoded embeddings, how can we structure this using Feast?

@jeremyary jeremyary added kind/question Further information is requested and removed kind/bug labels Feb 28, 2024
@HaoXuAI
Copy link
Collaborator

HaoXuAI commented Mar 5, 2024

This is a feature we are planning to add to feast. On a in-mature thought we can add an API that can both index and retrieve the embedding. probably can use Faiss as a stab. Will initiate a RFC for the work.

@boumelhaa
Copy link
Author

Yeah, Faiss seems like a promising candidate, although the in-memory aspect can pose scalability and re-indexing challenges.
Integrating it with Elasticsearch would enhance its appeal, allowing for the registration of embeddings and direct materialization into ES or any other search API, offering an alternative to traditional online store technologies.

@HaoXuAI
Copy link
Collaborator

HaoXuAI commented Mar 19, 2024

@boumelhaa for the online store with serach functionality, are you using the elasticsearch?

@tokoko
Copy link
Collaborator

tokoko commented Mar 19, 2024

Don't really know much about the subject, but feels like people might want to use different technologies for normal feature lookup and vector search. Is it the right time to also start thinking about (better) supporting configuration of multiple online stores in the same feast project?

@HaoXuAI
Copy link
Collaborator

HaoXuAI commented Mar 26, 2024

Don't really know much about the subject, but feels like people might want to use different technologies for normal feature lookup and vector search. Is it the right time to also start thinking about (better) supporting configuration of multiple online stores in the same feast project?

Not sure how that would help the search use case but yeah definitely a good feature to have.

@franciscojavierarceo
Copy link
Member

This is a great topic and something I was actually quite excited about supporting. Glad to see @HaoXuAI already on it! 🚀

@boumelhaa
Copy link
Author

boumelhaa commented Apr 4, 2024

@boumelhaa for the online store with serach functionality, are you using the elasticsearch?

I have employed Elasticsearch in an initiative aimed at optimizing vector search and experimenting with its Approximate Nearest Neighbors (ANN) functionality. Locally, it demonstrated superb speed in searching using cosine similarity. Additionally, ES can be readily managed by AWS (open search) and other cloud providers.

From my perspective, if we opt for ES or any other search technologie, we'll need to abstract away all the tedious aspects of indexing the vectors and searching through them, as well as implementing methods to retrieve the k most similar vectors using multiple algorithms (brute force, ANN, etc.) just like how faiss does it.

In the feature_store.yaml, I believe it would be prudent to distinguish it from both the offline and online stores, optionally adding it on top of them, as not all use cases will require search functionality

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Further information is requested priority/p2
Projects
None yet
Development

No branches or pull requests

5 participants