Skip to content

Commit 29d98cd

Browse files
committed
format
1 parent 513dd39 commit 29d98cd

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

‎sdk/python/feast/feature_store.py‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
cast,
3434
)
3535

36-
import numpy as np
3736
import pandas as pd
3837
import pyarrow as pa
3938
from colorama import Fore, Style
@@ -1724,7 +1723,10 @@ def _retrieve_online_documents(
17241723
raise ValueError(
17251724
"Using embedding functionality is not supported for document retrieval. Please embed the query before calling retrieve_online_documents."
17261725
)
1727-
(requested_feature_views, _,) = self._get_feature_views_to_use(
1726+
(
1727+
requested_feature_views,
1728+
_,
1729+
) = self._get_feature_views_to_use(
17281730
features=[feature], allow_cache=True, hide_dummy_entity=False
17291731
)
17301732
requested_feature = (
@@ -1970,7 +1972,7 @@ def _retrieve_from_online_store(
19701972
provider: Provider,
19711973
table: FeatureView,
19721974
requested_feature: str,
1973-
query: Union[str, List[float]],
1975+
query: List[float],
19741976
top_k: int,
19751977
) -> List[Tuple[List[Timestamp], List["FieldStatus.ValueType"], List[Value]]]:
19761978
"""

‎sdk/python/feast/infra/online_stores/contrib/postgres.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from datetime import datetime
55
from typing import Any, Callable, Dict, List, Literal, Optional, Sequence, Tuple
66

7-
import numpy as np
87
import psycopg2
98
import pytz
109
from psycopg2 import sql

‎sdk/python/feast/infra/online_stores/online_store.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,5 +152,10 @@ def retrieve_online_documents(
152152
requested_feature: The name of the feature whose embeddings should be used for retrieval.
153153
embedding: The embeddings to use for retrieval.
154154
top_k: The number of nearest neighbors to retrieve.
155+
156+
Returns:
157+
A list of top k closest documents to the specified embedding. Each item in the list is a tuple
158+
where the first item is the event timestamp for the row, and the second item is a dict of feature
159+
name to embeddings.
155160
"""
156161
pass

0 commit comments

Comments
 (0)