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

Remove default list from the FeatureView constructor #1679

Merged
merged 1 commit into from
Jul 1, 2021
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
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