Skip to content

Commit

Permalink
[FIX] Fix selection of indexes from dataset decorator (#536)
Browse files Browse the repository at this point in the history
  • Loading branch information
nonibansal authored Aug 24, 2024
1 parent 0e31b5d commit 1a435d5
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
3 changes: 3 additions & 0 deletions fennel/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## [1.5.8] - 2024-08-23
- Fix selection of indexes from dataset decorator

## [1.5.7] - 2024-08-21
- Fix proto for lookback

Expand Down
21 changes: 18 additions & 3 deletions fennel/datasets/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -1198,17 +1198,32 @@ def dataset(
raise ValueError(
"When 'index' is set as True then 'offline' or 'online' params can only be set as False."
)
elif not offline and not online:
# handling @dataset(index=True) choosing both index
elif offline is None and online is None:
index_obj = Index(
type=IndexType.primary,
online=True,
offline=IndexDuration.forever,
)
elif not offline:
# handling @dataset(index=True, offline=False, online=False) choosing none
elif (
not offline
and not online
and offline is not None
and online is not None
):
index_obj = Index(
type=IndexType.primary,
online=False,
offline=IndexDuration.none,
)
# handling @dataset(index=True, offline=False) choosing only offline index
elif offline is not None and not offline:
index_obj = Index(
type=IndexType.primary, online=True, offline=IndexDuration.none
)
else:
# handling @dataset(index=True, online=False) choosing only online index
elif online is not None and not online:
index_obj = Index(
type=IndexType.primary,
online=False,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "fennel-ai"
version = "1.5.7"
version = "1.5.8"
description = "The modern realtime feature engineering platform"
authors = ["Fennel AI <developers@fennel.ai>"]
packages = [{ include = "fennel" }]
Expand Down

0 comments on commit 1a435d5

Please sign in to comment.