Skip to content

Commit da1ddab

Browse files
docs: Add docs for Go feature server (#2540)
* Add docs for Go feature server Signed-off-by: Felix Wang <wangfelix98@gmail.com> * Update go feature server docs Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Address review components Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Fix Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Fix links Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Revert Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Fix Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Fix test config Signed-off-by: Felix Wang <wangfelix98@gmail.com> Co-authored-by: Kevin Zhang <kzhang@tecton.ai>
1 parent 44f5c11 commit da1ddab

File tree

6 files changed

+46
-7
lines changed

6 files changed

+46
-7
lines changed

docs/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
* [.feastignore](reference/feature-repository/feast-ignore.md)
8383
* [Feature servers](reference/feature-servers/README.md)
8484
* [Local feature server](reference/feature-servers/local-feature-server.md)
85+
* [Go-based feature retrieval](reference/feature-servers/go-feature-retrieval.md)
8586
* [\[Alpha\] Data quality monitoring](reference/dqm.md)
8687
* [\[Alpha\] On demand feature view](reference/alpha-on-demand-feature-view.md)
8788
* [\[Alpha\] Stream ingestion](reference/alpha-stream-ingestion.md)
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Go-based Feature Retrieval
2+
3+
## Overview
4+
5+
The Go Feature Retrieval component is a Go implementation of the core feature serving logic, embedded in the Python SDK. It supports retrieval of feature references, feature services, and on demand feature views, and can be used either through the Python SDK or the [Python feature server](local-feature-server.md).
6+
7+
Currently, this component only supports online serving and does not have an offline component including APIs to create feast feature repositories or apply configuration to the registry to facilitate online materialization. It also does not expose its own dedicated cli to perform feast actions. Furthermore, this component is only meant to expose an online serving API that can be called through the python SDK to facilitate faster online feature retrieval.
8+
9+
The Go Feature Retrieval component currently only supports Redis and Sqlite as online stores; support for other online stores will be added soon. Initial benchmarks indicate that it is significantly faster than the Python feature server for online feature retrieval. We plan to release a more comprehensive set of benchmarks. For more details, see the [RFC](https://docs.google.com/document/d/1Lgqv6eWYFJgQ7LA_jNeTh8NzOPhqI9kGTeyESRpNHnE).
10+
11+
## Installation
12+
13+
As long as you are running macOS or linux x86 with python version 3.7-3.10, the go component comes pre-compiled when you run install feast.
14+
15+
For developers, if you want to build from source, run `make compile-go-lib` to build and compile the go server.
16+
17+
## Usage
18+
19+
To enable the Go online feature retrieval component, set `go_feature_retrieval: True` in your `feature_store.yaml`. This will direct all online feature retrieval to Go instead of Python. This flag will be enabled by default in the future.
20+
21+
{% code title="feature_store.yaml" %}
22+
```yaml
23+
project: my_feature_repo
24+
registry: data/registry.db
25+
provider: local
26+
online_store:
27+
type: redis
28+
connection_string: "localhost:6379"
29+
go_feature_retrieval: True
30+
```
31+
{% endcode %}
32+
33+
## Future/Current Work
34+
35+
The Go feature retrieval online feature logging for Data Quality Monitoring is currently in development. More information can be found [here](https://docs.google.com/document/d/110F72d4NTv80p35wDSONxhhPBqWRwbZXG4f9mNEMd98/edit#heading=h.9gaqqtox9jg6).
36+
37+
We also plan on adding support for the Java feature server (e.g. the capability to call into the Go component and execute Java UDFs).
38+

sdk/python/feast/feature_store.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1311,7 +1311,7 @@ def _get_online_features(
13111311
}
13121312

13131313
# If Go feature server is enabled, send request to it instead of going through regular Python logic
1314-
if self.config.go_feature_server:
1314+
if self.config.go_feature_retrieval:
13151315
from feast.embedded_go.online_features_service import (
13161316
EmbeddedOnlineFeatureServer,
13171317
)

sdk/python/feast/repo_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class RepoConfig(FeastBaseModel):
118118

119119
repo_path: Optional[Path] = None
120120

121-
go_feature_server: Optional[bool] = False
121+
go_feature_retrieval: Optional[bool] = False
122122

123123
def __init__(self, **data: Any):
124124
super().__init__(**data)

sdk/python/tests/integration/feature_repos/integration_test_repo_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class IntegrationTestRepoConfig:
2727
full_feature_names: bool = True
2828
infer_features: bool = False
2929
python_feature_server: bool = False
30-
go_feature_server: bool = False
30+
go_feature_retrieval: bool = False
3131

3232
def __repr__(self) -> str:
3333
if not self.online_store_creator:

sdk/python/tests/integration/feature_repos/repo_configuration.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,13 @@
116116
),
117117
# Go implementation for online retrieval
118118
IntegrationTestRepoConfig(
119-
online_store=REDIS_CONFIG, go_feature_server=True,
119+
online_store=REDIS_CONFIG, go_feature_retrieval=True,
120120
),
121121
# TODO(felixwang9817): Enable this test once https://github.com/feast-dev/feast/issues/2544 is resolved.
122122
# IntegrationTestRepoConfig(
123123
# online_store=REDIS_CONFIG,
124124
# python_feature_server=True,
125-
# go_feature_server=True,
125+
# go_feature_retrieval=True,
126126
# ),
127127
]
128128
)
@@ -154,7 +154,7 @@
154154

155155

156156
GO_REPO_CONFIGS = [
157-
IntegrationTestRepoConfig(online_store=REDIS_CONFIG, go_feature_server=True,),
157+
IntegrationTestRepoConfig(online_store=REDIS_CONFIG, go_feature_retrieval=True,),
158158
]
159159

160160

@@ -423,7 +423,7 @@ def construct_test_environment(
423423
online_store=online_store,
424424
repo_path=repo_dir_name,
425425
feature_server=feature_server,
426-
go_feature_server=test_repo_config.go_feature_server,
426+
go_feature_retrieval=test_repo_config.go_feature_retrieval,
427427
)
428428

429429
# Create feature_store.yaml out of the config

0 commit comments

Comments
 (0)