Skip to content

Commit

Permalink
fix: SQL Registry initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhargav Dodla committed Feb 7, 2024
1 parent b241c6a commit 07a284c
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions sdk/python/feast/feature_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def __init__(
registry_config = self.config.registry
if registry_config.registry_type == "sql":
self._registry = SqlRegistry(registry_config, self.config.project, None)
if registry_config.registry_type == "http":
elif registry_config.registry_type == "http":
self._registry = HttpRegistry(registry_config, self.config.project, None)
elif registry_config.registry_type == "snowflake.registry":
from feast.infra.registry.snowflake import SnowflakeRegistry
Expand Down Expand Up @@ -1663,9 +1663,9 @@ def _get_online_features(

return self._go_server.get_online_features(
features_refs=features if isinstance(features, list) else [],
feature_service=features
if isinstance(features, FeatureService)
else None,
feature_service=(
features if isinstance(features, FeatureService) else None
),
entities=entity_native_values,
request_data={}, # TODO: add request data parameter to public API
full_feature_names=full_feature_names,
Expand Down Expand Up @@ -1876,9 +1876,9 @@ def _get_entity_maps(
)
entity_name_to_join_key_map[entity_name] = join_key
for entity_column in feature_view.entity_columns:
entity_type_map[
entity_column.name
] = entity_column.dtype.to_value_type()
entity_type_map[entity_column.name] = (
entity_column.dtype.to_value_type()
)

return (
entity_name_to_join_key_map,
Expand Down Expand Up @@ -2093,9 +2093,11 @@ def _populate_response_from_feature_data(
"""
# Add the feature names to the response.
requested_feature_refs = [
f"{table.projection.name_to_use()}__{feature_name}"
if full_feature_names
else feature_name
(
f"{table.projection.name_to_use()}__{feature_name}"
if full_feature_names
else feature_name
)
for feature_name in requested_features
]
online_features_response.metadata.feature_names.val.extend(
Expand Down

0 comments on commit 07a284c

Please sign in to comment.