Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
linter
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
  • Loading branch information
franciscojavierarceo committed May 2, 2024
commit 6dd845dfbabe21b053e19b75cb0c839aac597d84
4 changes: 2 additions & 2 deletions sdk/python/feast/feature_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -1757,15 +1757,15 @@ def retrieve_online_documents(
feature=feature,
query=query,
top_k=top_k,
distance_metric=distinct_metric,
distance_metric=distance_metric,
)

def _retrieve_online_documents(
self,
feature: str,
query: Union[str, List[float]],
top_k: int,
distance_metric: str="L2",
distance_metric: str = "L2",
):
if isinstance(query, str):
raise ValueError(
Expand Down
2 changes: 0 additions & 2 deletions sdk/python/feast/infra/online_stores/contrib/postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
from feast.repo_config import RepoConfig
from feast.usage import log_exceptions_and_usage



SUPPORTED_DISTANCE_METRICS_DICT = {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's cool!

"L2": "<->",
"inner_product": "<#>",
Expand Down
7 changes: 6 additions & 1 deletion sdk/python/feast/infra/passthrough_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,12 @@ def retrieve_online_documents(
result = []
if self.online_store:
result = self.online_store.retrieve_online_documents(
config, table, requested_feature, query, top_k, distance_metric,
config,
table,
requested_feature,
query,
top_k,
distance_metric,
)
return result

Expand Down
2 changes: 1 addition & 1 deletion sdk/python/feast/infra/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def retrieve_online_documents(
requested_feature: str,
query: List[float],
top_k: int,
distance_metric: str="euclidean",
distance_metric: str = "euclidean",
Comment thread
franciscojavierarceo marked this conversation as resolved.
Outdated
) -> List[
Tuple[
Optional[datetime],
Expand Down