Skip to main content

Feast

Introduction

Feast is a standalone, open-source feature store that stores and serves features consistently for offline training and online inference. Feast uses online stores to serve features at low latency. Feature values are loaded from data sources into the online store via materialization, which can be triggered using the feast materialize command.

Redis is one of the online stores supported by Feast. Since Dragonfly is highly compatible with Redis, it can be used as an alternative online store for Feast with zero code changes and minimal configuration changes in your application.

Running Feast with Dragonfly

Please follow the steps below to configure Dragonfly and utilize Feast in your application.

1. Prerequisites

Make sure you have Python and pip installed. Then you can install the Feast SDK and CLI:

$> pip install feast

In order to use Dragonfly as the online store, you'll need to install the Redis extra for Feast:

$> pip install 'feast[redis]'

2. Feature Repository Creation

Bootstrap a new feature repository:

$> feast init feast_dragonfly
$> cd feast_dragonfly/feature_repo

Update feature_repo/feature_store.yaml with the below contents:

project: feast_dragonfly
registry: data/registry.db
provider: local
online_store:
type: redis
connection_string: "localhost:6379"

3. Dragonfly Initialization

There are several options available to get Dragonfly up and running quickly. Assuming you have a local Dragonfly binary, you can run Dragonfly with the following flags. Make sure to use the same address and port as specified in the feature_store.yaml file above.

$> ./dragonfly --bind localhost --port 6379

4. Feast Usage

At this point, you have successfully configured Feast to use Dragonfly as the online store. To learn more about how to actually use Feast, please refer to the Feast quickstart guide.

Useful Resources