From 143ef18c36c8e0ec7c60438074338e59c1f6c82f Mon Sep 17 00:00:00 2001 From: Theodor Mihalache Date: Mon, 10 Jun 2024 16:16:00 -0400 Subject: [PATCH 1/2] Fixed OfflineServer teardown Signed-off-by: Theodor Mihalache --- .../integration/feature_repos/universal/data_sources/file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/python/tests/integration/feature_repos/universal/data_sources/file.py b/sdk/python/tests/integration/feature_repos/universal/data_sources/file.py index ab7cf71a4e..817ad73b2a 100644 --- a/sdk/python/tests/integration/feature_repos/universal/data_sources/file.py +++ b/sdk/python/tests/integration/feature_repos/universal/data_sources/file.py @@ -416,7 +416,7 @@ def create_offline_store_config(self) -> FeastConfigBaseModel: def teardown(self): super().teardown() - if self.proc is None and self.proc.is_alive(): + if self.proc is not None and self.proc.is_alive(): self.proc.kill() # wait server to free the port From bd9cd796036e9dc149dfff4c3bf240e4a7b22b67 Mon Sep 17 00:00:00 2001 From: Abdul Hameed Date: Thu, 13 Jun 2024 12:27:01 -0400 Subject: [PATCH 2/2] updated the document for remote offline feature server and client Signed-off-by: Abdul Hameed --- docs/SUMMARY.md | 3 +- docs/reference/feature-servers/README.md | 4 ++ .../feature-servers/offline-feature-server.md | 35 ++++++++++++++++ .../feature-servers/remote-offline-store.md | 42 ------------------- .../offline-stores/remote-offline-store.md | 28 +++++++++++++ .../universal/data_sources/file.py | 2 +- 6 files changed, 70 insertions(+), 44 deletions(-) create mode 100644 docs/reference/feature-servers/offline-feature-server.md delete mode 100644 docs/reference/feature-servers/remote-offline-store.md create mode 100644 docs/reference/offline-stores/remote-offline-store.md diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index da3b3eeeed..af6362da3e 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -85,6 +85,7 @@ * [PostgreSQL (contrib)](reference/offline-stores/postgres.md) * [Trino (contrib)](reference/offline-stores/trino.md) * [Azure Synapse + Azure SQL (contrib)](reference/offline-stores/mssql.md) + * [Remote Offline](reference/offline-stores/remote-offline-store.md) * [Online stores](reference/online-stores/README.md) * [Overview](reference/online-stores/overview.md) * [SQLite](reference/online-stores/sqlite.md) @@ -117,7 +118,7 @@ * [Python feature server](reference/feature-servers/python-feature-server.md) * [\[Alpha\] Go feature server](reference/feature-servers/go-feature-server.md) * [\[Alpha\] AWS Lambda feature server](reference/feature-servers/alpha-aws-lambda-feature-server.md) - * [Remote Offline Store ](reference/feature-servers/remote-offline-store.md) + * [Offline Feature Server](reference/feature-servers/offline-feature-server) * [\[Beta\] Web UI](reference/alpha-web-ui.md) * [\[Alpha\] On demand feature view](reference/alpha-on-demand-feature-view.md) diff --git a/docs/reference/feature-servers/README.md b/docs/reference/feature-servers/README.md index f9a40104c3..d5a4312f73 100644 --- a/docs/reference/feature-servers/README.md +++ b/docs/reference/feature-servers/README.md @@ -12,4 +12,8 @@ Feast users can choose to retrieve features from a feature server, as opposed to {% content-ref url="alpha-aws-lambda-feature-server.md" %} [alpha-aws-lambda-feature-server.md](alpha-aws-lambda-feature-server.md) +{% endcontent-ref %} + +{% content-ref url="offline-feature-server.md" %} +[offline-feature-server.md](offline-feature-server.md) {% endcontent-ref %} \ No newline at end of file diff --git a/docs/reference/feature-servers/offline-feature-server.md b/docs/reference/feature-servers/offline-feature-server.md new file mode 100644 index 0000000000..6c2fdf7a25 --- /dev/null +++ b/docs/reference/feature-servers/offline-feature-server.md @@ -0,0 +1,35 @@ +# Offline feature server + +## Description + +The Offline feature server is an Apache Arrow Flight Server that uses the gRPC communication protocol to exchange data. +This server wraps calls to existing offline store implementations and exposes interfaces as Arrow Flight endpoints. + +## How to configure the server + +## CLI + +There is a CLI command that starts the Offline feature server: `feast serve_offline`. By default, remote offline server uses port 8815, the port can be overridden with a `--port` flag. + +## Deploying as a service on Kubernetes + +The Offline feature server can be deployed using helm chart see this [helm chart](https://github.com/feast-dev/feast/blob/master/infra/charts/feast-feature-server). + +User need to set `feast_mode=offline`, when installing Offline feature server as shown in the helm command below: + +``` +helm install feast-offline-server feast-charts/feast-feature-server --set feast_mode=offline --set feature_store_yaml_base64=$(base64 > feature_store.yaml) +``` + +## Server Example + +The complete example can be find under [remote-offline-store-example](../../../examples/remote-offline-store) + +## How to configure the client + +Please see the detail how to configure offline store client [remote-offline-store.md](../offline-stores/remote-offline-store.md) + +## Functionality Matrix + +The set of functionalities supported by remote offline stores is the same as those supported by offline stores with the SDK, which are described in detail [here](../offline-stores/overview.md#functionality). + diff --git a/docs/reference/feature-servers/remote-offline-store.md b/docs/reference/feature-servers/remote-offline-store.md deleted file mode 100644 index 565ce5276a..0000000000 --- a/docs/reference/feature-servers/remote-offline-store.md +++ /dev/null @@ -1,42 +0,0 @@ -# Remote Offline Store - -## Description - -The Python offline server is an Apache Arrow Flight Server that uses the gRPC communication protocol to exchange data. -This server wraps calls to existing offline store implementations and exposes interfaces as Arrow Flight endpoints. - - -## CLI - -There is a CLI command that starts the remote offline server: `feast serve_offline`. By default, remote offline server uses port 8815, the port can be overridden with a `--port` flag. - -## Deploying as a service on Kubernetes - -The remote offline server can be deployed using helm chart see this [helm chart](https://github.com/feast-dev/feast/blob/master/infra/charts/feast-feature-server). - -User need to set `feast_mode=offline`, when installing offline server as shown in the helm command below: - -``` -helm install feast-offline-server feast-charts/feast-feature-server --set feast_mode=offline --set feature_store_yaml_base64=$(base64 > feature_store.yaml) -``` - -## Client Example - -User needs to create client side `feature_store.yaml` file and set the `offline_store` type `remote` and provide the server connection configuration -including adding the host and specifying the port (default is 8815) required by the Arrow Flight client to connect with the Arrow Flight server. - -{% code title="feature_store.yaml" %} -```yaml -offline_store: - type: remote - host: localhost - port: 8815 -``` -{% endcode %} - -The complete example can be find under [remote-offline-store-example](../../../examples/remote-offline-store) - -## Functionality Matrix - -The set of functionalities supported by remote offline stores is the same as those supported by offline stores with the SDK, which are described in detail [here](../offline-stores/overview.md#functionality). - diff --git a/docs/reference/offline-stores/remote-offline-store.md b/docs/reference/offline-stores/remote-offline-store.md new file mode 100644 index 0000000000..0179e0f06f --- /dev/null +++ b/docs/reference/offline-stores/remote-offline-store.md @@ -0,0 +1,28 @@ +# Remote Offline Store + +## Description + +The Remote Offline Store is an Arrow Flight client for the offline store that implements the `RemoteOfflineStore` class using the existing `OfflineStore` interface. +The client implements various methods, including `get_historical_features`, `pull_latest_from_table_or_query`, `write_logged_features`, and `offline_write_batch`. + +## How to configure the client + +User needs to create client side `feature_store.yaml` file and set the `offline_store` type `remote` and provide the server connection configuration +including adding the host and specifying the port (default is 8815) required by the Arrow Flight client to connect with the Arrow Flight server. + +{% code title="feature_store.yaml" %} +```yaml +offline_store: + type: remote + host: localhost + port: 8815 +``` +{% endcode %} + +## Client Example + +The complete example can be find under [remote-offline-store-example](../../../examples/remote-offline-store) + +## How to configure the server + +Please see the detail how to configure offline feature server [offline-feature-server.md](../feature-servers/offline-feature-server.md) \ No newline at end of file diff --git a/sdk/python/tests/integration/feature_repos/universal/data_sources/file.py b/sdk/python/tests/integration/feature_repos/universal/data_sources/file.py index 817ad73b2a..f7ab55d868 100644 --- a/sdk/python/tests/integration/feature_repos/universal/data_sources/file.py +++ b/sdk/python/tests/integration/feature_repos/universal/data_sources/file.py @@ -416,7 +416,7 @@ def create_offline_store_config(self) -> FeastConfigBaseModel: def teardown(self): super().teardown() - if self.proc is not None and self.proc.is_alive(): + if self.proc is not None: self.proc.kill() # wait server to free the port