Skip to content

Commit d282998

Browse files
judahrandadchia
authored andcommitted
Remove argument feature_refs (#2115)
This argument was scheduled for removal in 0.14 according the deprecation warning. Signed-off-by: Judah Rand <17158624+judahrand@users.noreply.github.com>
1 parent 65c41bd commit d282998

1 file changed

Lines changed: 5 additions & 26 deletions

File tree

‎sdk/python/feast/feature_store.py‎

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -332,12 +332,8 @@ def delete_feature_service(self, name: str):
332332
"""
333333
return self._registry.delete_feature_service(name, self.project)
334334

335-
def _get_features(
336-
self,
337-
features: Optional[Union[List[str], FeatureService]],
338-
feature_refs: Optional[List[str]],
339-
) -> List[str]:
340-
_features = features or feature_refs
335+
def _get_features(self, features: Union[List[str], FeatureService],) -> List[str]:
336+
_features = features
341337
if not _features:
342338
raise ValueError("No features specified for retrieval")
343339

@@ -587,8 +583,7 @@ def teardown(self):
587583
def get_historical_features(
588584
self,
589585
entity_df: Union[pd.DataFrame, str],
590-
features: Optional[Union[List[str], FeatureService]] = None,
591-
feature_refs: Optional[List[str]] = None,
586+
features: Union[List[str], FeatureService],
592587
full_feature_names: bool = False,
593588
) -> RetrievalJob:
594589
"""Enrich an entity dataframe with historical feature values for either training or batch scoring.
@@ -647,23 +642,8 @@ def get_historical_features(
647642
... )
648643
>>> feature_data = retrieval_job.to_df()
649644
"""
650-
if (features is not None and feature_refs is not None) or (
651-
features is None and feature_refs is None
652-
):
653-
raise ValueError(
654-
"You must specify exactly one of features and feature_refs."
655-
)
656-
657-
if feature_refs:
658-
warnings.warn(
659-
(
660-
"The argument 'feature_refs' is being deprecated. Please use 'features' "
661-
"instead. Feast 0.13 and onwards will not support the argument 'feature_refs'."
662-
),
663-
DeprecationWarning,
664-
)
665645

666-
_feature_refs = self._get_features(features, feature_refs)
646+
_feature_refs = self._get_features(features)
667647
(
668648
all_feature_views,
669649
all_request_feature_views,
@@ -930,7 +910,6 @@ def get_online_features(
930910
self,
931911
features: Union[List[str], FeatureService],
932912
entity_rows: List[Dict[str, Any]],
933-
feature_refs: Optional[List[str]] = None,
934913
full_feature_names: bool = False,
935914
) -> OnlineResponse:
936915
"""
@@ -974,7 +953,7 @@ def get_online_features(
974953
... )
975954
>>> online_response_dict = online_response.to_dict()
976955
"""
977-
_feature_refs = self._get_features(features, feature_refs)
956+
_feature_refs = self._get_features(features)
978957
(
979958
requested_feature_views,
980959
requested_request_feature_views,

0 commit comments

Comments
 (0)