Back to Feast

Faiss online store

docs/reference/online-stores/faiss.md

0.63.02.9 KB
Original Source

Faiss online store

Description

The Faiss online store provides support for materializing feature values and performing vector similarity search using Facebook AI Similarity Search (Faiss). Faiss is a library for efficient similarity search and clustering of dense vectors, making it well-suited for use cases involving embeddings and nearest-neighbor lookups.

Getting started

In order to use this online store, you'll need to install the Faiss dependency. E.g.

pip install 'feast[faiss]'

Example

{% code title="feature_store.yaml" %}

yaml
project: my_feature_repo
registry: data/registry.db
provider: local
online_store:
  type: feast.infra.online_stores.faiss_online_store.FaissOnlineStore
  dimension: 128
  index_path: data/faiss_index
  index_type: IVFFlat    # optional, default: IVFFlat
  nlist: 100             # optional, default: 100

{% endcode %}

Note: Faiss is not registered as a named online store type. You must use the fully qualified class path as the type value.

The full set of configuration options is available in FaissOnlineStoreConfig.

Functionality Matrix

The set of functionality supported by online stores is described in detail here. Below is a matrix indicating which functionality is supported by the Faiss online store.

Faiss
write feature values to the online storeyes
read feature values from the online storeyes
update infrastructure (e.g. tables) in the online storeyes
teardown infrastructure (e.g. tables) in the online storeyes
generate a plan of infrastructure changesno
support for on-demand transformsyes
readable by Python SDKyes
readable by Javano
readable by Gono
support for entityless feature viewsyes
support for concurrent writing to the same keyno
support for ttl (time to live) at retrievalno
support for deleting expired datano
collocated by feature viewyes
collocated by feature serviceno
collocated by entity keyno
vector similarity searchyes

To compare this set of functionality against other online stores, please see the full functionality matrix.