Skip to content

Commit

Permalink
Remove default list from the FeatureView constructor (#1679)
Browse files Browse the repository at this point in the history
Signed-off-by: Achal Shah <achals@gmail.com>
  • Loading branch information
achals authored Jul 1, 2021
1 parent a5c330e commit 1f64c4d
Showing 1 changed file with 5 additions and 3 deletions.
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

0 comments on commit 1f64c4d

Please sign in to comment.