Skip to content

Commit

Permalink
fix: Parsing online store configuration correctly when provider is ex…
Browse files Browse the repository at this point in the history
…pedia (#124)

Co-authored-by: Bhargav Dodla <[email protected]>
  • Loading branch information
EXPEbdodla and Bhargav Dodla authored Aug 5, 2024
1 parent b3cd2ca commit ac87c28
Show file tree
Hide file tree
Showing 11 changed files with 519 additions and 442 deletions.
2 changes: 1 addition & 1 deletion sdk/python/feast/repo_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def __init__(self, **data: Any):

self._online_store = None
if provider == "expedia":
self.online_config = "redis"
self.online_config = data.get("online_store", "redis")
else:
self.online_config = data.get("online_store", "sqlite")

Expand Down
17 changes: 11 additions & 6 deletions sdk/python/feast/type_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,13 +396,18 @@ def _python_value_to_proto_value(
raise _type_err(item, valid_types[0])

if feast_value_type == ValueType.UNIX_TIMESTAMP_LIST:
int_timestamps_lists = (
_python_datetime_to_int_timestamp(value) for value in values
)
return [
# ProtoValue does actually accept `np.int_` but the typing complains.
ProtoValue(unix_timestamp_list_val=Int64List(val=ts)) # type: ignore
for ts in int_timestamps_lists
(
# ProtoValue does actually accept `np.int_` but the typing complains.
ProtoValue(
unix_timestamp_list_val=Int64List(
val=_python_datetime_to_int_timestamp(value) # type: ignore
)
)
if value is not None
else ProtoValue()
)
for value in values
]
if feast_value_type == ValueType.BOOL_LIST:
# ProtoValue does not support conversion of np.bool_ so we need to convert it to support np.bool_.
Expand Down
Loading

0 comments on commit ac87c28

Please sign in to comment.