Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove update_infra from Expedia provider #152

Merged
merged 12 commits into from
Nov 1, 2024
27 changes: 1 addition & 26 deletions sdk/python/feast/expediagroup/provider/expedia.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import logging
from typing import List, Sequence, Set
from typing import List, Set

import pandas as pd

from feast.entity import Entity
from feast.feature_view import FeatureView
from feast.infra.passthrough_provider import PassthroughProvider
from feast.repo_config import RepoConfig
Expand Down Expand Up @@ -59,27 +58,3 @@ def ingest_df(
)

super().ingest_df(feature_view, df.drop(drop_list, axis=1))

def update_infra(
self,
project: str,
tables_to_delete: Sequence[FeatureView],
tables_to_keep: Sequence[FeatureView],
entities_to_delete: Sequence[Entity],
entities_to_keep: Sequence[Entity],
partial: bool,
):
if self.online_store:
if tables_to_delete:
logger.info(
f"Data associated to {[feature_view.name for feature_view in tables_to_delete]} feature views will be deleted from the online store based on ttl defined if the entities are not shared with other feature views"
)

if self.batch_engine:
self.batch_engine.update(
project,
tables_to_delete,
tables_to_keep,
entities_to_delete,
entities_to_keep,
)
6 changes: 6 additions & 0 deletions sdk/python/feast/feature_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -1288,6 +1288,9 @@ def materialize_incremental(
f" from {Style.BRIGHT + Fore.GREEN}{start_date.replace(microsecond=0).astimezone()}{Style.RESET_ALL}"
f" to {Style.BRIGHT + Fore.GREEN}{end_date.replace(microsecond=0).astimezone()}{Style.RESET_ALL}:"
)
logger.info(
f"Materializing {feature_view.name} from {start_date.astimezone()} to {end_date.astimezone()}"
)

def tqdm_builder(length):
return tqdm(total=length, ncols=100)
Expand Down Expand Up @@ -1363,6 +1366,9 @@ def materialize(
for feature_view in feature_views_to_materialize:
provider = self._get_provider()
print(f"{Style.BRIGHT + Fore.GREEN}{feature_view.name}{Style.RESET_ALL}:")
logger.info(
f"Materializing {feature_view.name} from {start_date.astimezone()} to {end_date.astimezone()}"
)

def tqdm_builder(length):
return tqdm(total=length, ncols=100)
Expand Down
5 changes: 5 additions & 0 deletions sdk/python/feast/repo_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,11 @@ def __init__(self, **data: Any):
self._online_store = None
if provider == "expedia":
self.online_config = data.get("online_store", "redis")
if (
isinstance(self.online_config, Dict)
and self.online_config["type"] == "redis"
):
self.online_config["full_scan_for_deletion"] = False
else:
self.online_config = data.get("online_store", "sqlite")

Expand Down
Loading