Skip to content

Commit

Permalink
fix: address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
zabarn committed Oct 31, 2024
1 parent e22c327 commit 1a182c2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 18 deletions.
6 changes: 1 addition & 5 deletions sdk/python/feast/feature_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -1283,11 +1283,7 @@ def materialize_incremental(
)
start_date = _utc_now() - timedelta(weeks=52)
provider = self._get_provider()
print(
f"{Style.BRIGHT + Fore.GREEN}{feature_view.name}{Style.RESET_ALL}"
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"{feature_view.name} from {start_date.replace(microsecond=0).astimezone()} to {end_date.replace(microsecond=0).astimezone()}:")

def tqdm_builder(length):
return tqdm(total=length, ncols=100)
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/feast/infra/online_stores/redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class RedisOnlineStoreConfig(FeastConfigBaseModel):
key_ttl_seconds: Optional[int] = None
"""(Optional) redis key bin ttl (in seconds) for expiring entities"""

full_scan_for_deletion: Optional[bool] = False
full_scan_for_deletion: Optional[bool] = True
"""(Optional) whether to scan for deletion of features"""


Expand Down
17 changes: 6 additions & 11 deletions sdk/python/feast/repo_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,17 +242,12 @@ def __init__(self, **data: Any):

self._online_store = None
if provider == "expedia":
self.online_config = data.get(
"online_store",
{
"type": "redis",
"connection_string": "${REDIS_CONNECTION_STRING}",
"redis_type": "redis_cluster",
"key_ttl_seconds": 604800,
},
)
if self.online_config["type"] == "redis":
self.online_config["full_scan_for_deletion"] = True
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
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def test_repo_config_init_expedia_provider():
)
assert c.registry_config == "registry.db"
assert c.offline_config["type"] == "spark"
assert c.online_config["type"] == "redis"
assert c.online_config == "redis"
assert c.batch_engine_config == "spark.engine"
assert isinstance(c.online_store, RedisOnlineStoreConfig)
assert isinstance(c.batch_engine, SparkMaterializationEngineConfig)
Expand Down

0 comments on commit 1a182c2

Please sign in to comment.