Configure Feature Store
To use a Feast project, you must configure the feature store. The configuration is defined in a YAML configuration file.
The feature store forms part of the feature repository. The feature repository stores the configuration to run Feast on your infrastructure and the feature definitions in a central location. It provides the declarative source of truth for the desired state of the feature store. The feature repository consists of the following:
-
Feature declarations in Python files
-
Infrastructural configuration in the feature_store.yaml file
-
Paths to ignore in the feature repository in the .feastignore file
By default, the feature repository is the current directory. This can be changed using the Feast CLI, as described in the Feast CLI reference documentation.
For further information on the feature repository, refer to the Feature repository topic of the Feast documentation.
The feature_store.yaml file defines the following:
-
The environment in which Feast deploys and operates. This is defined in the
project
section -
The location of the feature registry. This is defined in the
registry
section -
The online store. This is defined in the
online_store
section -
The offline store. This is defined in the
offline_store
section -
The namespace to use for the feature store. This can be used to isolate multiple deployments in a single Feast installation, and can contain only letters, numbers, and underscores. This is defined in the
project
section -
The materialization engine. This is defined in the
engine
section -
The serialization service. This serializes the entity key to a bytestring to allow it to be be used as a lookup key in a hash table. You can specify Feast’s serialization service. This is defined in the
entity_key_serialization_version
section
Configure Hazelcast as Online Store
The online-store
section configures the online store and initializes a config object, which is passed to the OnlineStore
interface by Feast to create the connection.
The available options are as follows:
Name | Type | Description | Default Value |
---|---|---|---|
type |
String |
Online store type selector |
"hazelcast" |
cluster_name |
String |
Name of the cluster to which you want to connect |
"dev" |
cluster_members |
List[String] |
List of member addresses connected to your cluster |
["localhost:5701"] |
discovery_token |
String |
Discovery token used by a Hazelcast Cloud cluster |
"" |
ssl_cafile_path |
String |
Absolute path of CA certificates in PEM format |
"" |
ssl_certfile_path |
String |
Absolute path of the client certificate in PEM format |
"" |
ssl_keyfile_path |
String |
Absolute path of theprivate key file for the client certificate in PEM format |
"" |
ssl_password |
String |
Password for decrypting the keyfile, if encrypted |
"" |
key_ttl_seconds |
Integer |
Hazelcast key bin TTL for expiring entities, in seconds |
0 |
creds_username |
String |
Enterprise only. Username for credential authentication |
"" |
creds_password |
String |
Enterprise only. Password for credential authentication |
"" |
Example Local Cluster Configuration
You can configure the connection to a local cluster as shown in the following example:
online_store:
type: hazelcast
cluster_name: <YOUR_CLUSTER_NAME>
cluster_members: [<YOUR_CLUSTER_MEMBERS>]
ssl_cafile_path: <PATH_TO_CA_CERT>
ssl_certfile_path: <PATH_TO_CLIENT_CERT>
ssl_keyfile_path: <PATH_TO_PRIVATE_KEY_FILE>
ssl_password: <PATH_TO_DECRYPTION_PSWD>
key_ttl_seconds: <TTL_IN_SECONDS>
Example SSL-enabled Cluster Configuration
You can configure an SSL-enabled connection as shown in the following example:
online_store:
type: hazelcast
cluster_name: <YOUR_CLUSTER_NAME>
cluster_members: [<YOUR_CLUSTER_MEMBERS>]
sl_cafile_path: <PATH_TO_CA_CERT>
ssl_certfile_path: <PATH_TO_CLIENT_CERT>
kssl_keyfile_path: <PATH_TO_PRIVATE_KEY_FILE>
ssl_password: <YOUR_SSL_PASSWORD>