Skip to content

Commit

Permalink
Adding documentation and incorporating code review comment.
Browse files Browse the repository at this point in the history
Signed-off-by: Lokesh Rangineni <lokeshforjava@gmail.com>
  • Loading branch information
lokeshrangineni committed Jun 12, 2024
1 parent bdfbb72 commit 1a7e4db
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 9 deletions.
4 changes: 4 additions & 0 deletions docs/reference/online-stores/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,7 @@ Please see [Online Store](../../getting-started/architecture-and-components/onli
{% content-ref url="scylladb.md" %}
[scylladb.md](scylladb.md)
{% endcontent-ref %}

{% content-ref url="remote.md" %}
[remote.md](remote.md)
{% endcontent-ref %}
21 changes: 21 additions & 0 deletions docs/reference/online-stores/remote.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Remote online store

## Description

This remote online store will let you interact with remote feature server. At this moment this only supports the read operation. You can use this online store and able retrieve online features `store.get_online_features` from remote feature server.

## Examples

The registry is pointing to registry of remote feature store. If it is not accessible then should be configured to use remote registry.

{% code title="feature_store.yaml" %}
```yaml
project: my-local-project
registry: /remote/data/registry.db
provider: local
online_store:
path: http://localhost:6566
type: remote
entity_key_serialization_version: 2
```
{% endcode %}
10 changes: 1 addition & 9 deletions sdk/python/feast/infra/online_stores/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,7 @@ def online_read(
for index, feature_name in enumerate(
response_json["metadata"]["feature_names"]
):
if self._check_if_feature_requested(
feature_name, requested_features
):
if feature_name in requested_features:
if (
response_json["results"][index]["statuses"][
feature_value_index
Expand Down Expand Up @@ -141,12 +139,6 @@ def _construct_online_read_api_json_request(
)
return req_body

def _check_if_feature_requested(self, feature_name, requested_features):
for requested_feature in requested_features:
if feature_name in requested_feature:
return True
return False

def _get_event_ts(self, response_json) -> datetime:
event_ts = ""
if len(response_json["results"]) > 1:
Expand Down

0 comments on commit 1a7e4db

Please sign in to comment.