Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Remove default list from the FeatureView constructor
Signed-off-by: Achal Shah <achals@gmail.com>
  • Loading branch information
achals committed Jul 1, 2021
commit 1193cb2b57fd64ed007cf5b5a5a41ec4b539ee65
8 changes: 5 additions & 3 deletions sdk/python/feast/feature_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,16 @@ def __init__(
input: DataSource,
batch_source: Optional[DataSource] = None,
stream_source: Optional[DataSource] = None,
features: List[Feature] = [],
features: List[Feature] = None,
tags: Optional[Dict[str, str]] = None,
online: bool = True,
):
_input = input or batch_source
assert _input is not None

cols = [entity for entity in entities] + [feat.name for feat in features]
_features = features or []

cols = [entity for entity in entities] + [feat.name for feat in _features]
for col in cols:
if _input.field_mapping is not None and col in _input.field_mapping.keys():
raise ValueError(
Expand All @@ -83,7 +85,7 @@ def __init__(

self.name = name
self.entities = entities
self.features = features
self.features = _features
self.tags = tags if tags is not None else {}

if isinstance(ttl, Duration):
Expand Down