Warning: This is an experimental feature. It's intended for early testing and feedback, and could change without warnings in future releases.
To enable this feature, runfeast alpha enable python_feature_server
Overview
The local feature server is an HTTP endpoint that serves features with JSON I/O. This enables users to get features from Feast using any programming language that can make HTTP requests. A remote feature server on AWS Lambda is also available. A remote feature server on GCP Cloud Run is currently being developed.
CLI
There is a new CLI command that starts the server: feast serve. By default Feast uses port 6566; the port be overridden by a --port flag.
Example
Here's the local feature server usage example with the local template:
$feastinitfeature_repoCreatinganewFeastrepositoryin/home/tsotne/feast/feature_repo.$cdfeature_repo$feastapplyRegisteredentitydriver_idRegisteredfeatureviewdriver_hourly_statsDeployinginfrastructurefordriver_hourly_stats$feastmaterialize-incremental $(date+%Y-%m-%d)Materializing1featureviewsto2021-09-0917:00:00-07:00intothesqliteonlinestore.driver_hourly_statsfrom2021-09-0916:51:08-07:00to2021-09-0917:00:00-07:00:100%|████████████████████████████████████████████████████████████████|5/5 [00:00<00:00, 295.24it/s]$feastserveThisisanexperimentalfeature.It's intended for early testing and feedback, and could change without warnings in future releases.INFO: Started server process [8889]09/10/2021 10:42:11 AM INFO:Started server process [8889]INFO: Waiting for application startup.09/10/2021 10:42:11 AM INFO:Waiting for application startup.INFO: Application startup complete.09/10/2021 10:42:11 AM INFO:Application startup complete.INFO: Uvicorn running on http://127.0.0.1:6566 (Press CTRL+C to quit)09/10/2021 10:42:11 AM INFO:Uvicorn running on http://127.0.0.1:6566 (Press CTRL+C to quit)
After the server starts, we can execute cURL commands from another terminal tab: