Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Show DeprecationWarning for FeatureView input parameter only when nec…
…essary

Signed-off-by: Felix Wang <wangfelix98@gmail.com>
  • Loading branch information
felixwang9817 committed Jul 29, 2021
commit 3948acceb13baf616d034e7f8d3a06c87a9db585
15 changes: 8 additions & 7 deletions sdk/python/feast/feature_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,14 @@ def __init__(
Raises:
ValueError: A field mapping conflicts with an Entity or a Feature.
"""
warnings.warn(
(
"The argument 'input' is being deprecated. Please use 'batch_source' "
"instead. Feast 0.13 and onwards will not support the argument 'input'."
),
DeprecationWarning,
)
if input is not None:
warnings.warn(
(
"The argument 'input' is being deprecated. Please use 'batch_source' "
"instead. Feast 0.13 and onwards will not support the argument 'input'."
),
DeprecationWarning,
)

_input = input or batch_source
assert _input is not None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ def test_apply_duplicated_featureview_names(feature_store_with_local_registry):
entities=["driver_id"],
ttl=timedelta(seconds=10),
online=False,
input=FileSource(path="driver_stats.parquet"),
batch_source=FileSource(path="driver_stats.parquet"),
tags={},
)

Expand All @@ -499,7 +499,7 @@ def test_apply_duplicated_featureview_names(feature_store_with_local_registry):
entities=["id"],
ttl=timedelta(seconds=10),
online=False,
input=FileSource(path="customer_stats.parquet"),
batch_source=FileSource(path="customer_stats.parquet"),
tags={},
)
try:
Expand Down