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 argument feature_refs #2115

Merged
merged 1 commit into from
Dec 8, 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
31 changes: 5 additions & 26 deletions sdk/python/feast/feature_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,12 +332,8 @@ def delete_feature_service(self, name: str):
"""
return self._registry.delete_feature_service(name, self.project)

def _get_features(
self,
features: Optional[Union[List[str], FeatureService]],
feature_refs: Optional[List[str]],
) -> List[str]:
_features = features or feature_refs
def _get_features(self, features: Union[List[str], FeatureService],) -> List[str]:
_features = features
if not _features:
raise ValueError("No features specified for retrieval")

Expand Down Expand Up @@ -587,8 +583,7 @@ def teardown(self):
def get_historical_features(
self,
entity_df: Union[pd.DataFrame, str],
features: Optional[Union[List[str], FeatureService]] = None,
feature_refs: Optional[List[str]] = None,
features: Union[List[str], FeatureService],
full_feature_names: bool = False,
) -> RetrievalJob:
"""Enrich an entity dataframe with historical feature values for either training or batch scoring.
Expand Down Expand Up @@ -647,23 +642,8 @@ def get_historical_features(
... )
>>> feature_data = retrieval_job.to_df()
"""
if (features is not None and feature_refs is not None) or (
features is None and feature_refs is None
):
raise ValueError(
"You must specify exactly one of features and feature_refs."
)

if feature_refs:
warnings.warn(
(
"The argument 'feature_refs' is being deprecated. Please use 'features' "
"instead. Feast 0.13 and onwards will not support the argument 'feature_refs'."
),
DeprecationWarning,
)

_feature_refs = self._get_features(features, feature_refs)
_feature_refs = self._get_features(features)
(
all_feature_views,
all_request_feature_views,
Expand Down Expand Up @@ -930,7 +910,6 @@ def get_online_features(
self,
features: Union[List[str], FeatureService],
entity_rows: List[Dict[str, Any]],
feature_refs: Optional[List[str]] = None,
full_feature_names: bool = False,
) -> OnlineResponse:
"""
Expand Down Expand Up @@ -974,7 +953,7 @@ def get_online_features(
... )
>>> online_response_dict = online_response.to_dict()
"""
_feature_refs = self._get_features(features, feature_refs)
_feature_refs = self._get_features(features)
(
requested_feature_views,
requested_request_feature_views,
Expand Down