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

chore: Deprecate value type #2673

Merged
merged 29 commits into from
May 18, 2022

Conversation

felixwang9817
Copy link
Collaborator

@felixwang9817 felixwang9817 commented May 11, 2022

What this PR does / why we need it: #2611 was reverted due to a bug. Specifically, FeatureView.__eq__ was missing a comparison of the entity_columns attribute. In Registry.apply_feature_view, we do not apply a feature view if it is equal to an existing feature view. The error occurred since the Java feature repo has a registry.db file that has already been populated with feature views; the new method of entity inference added some information to the entity_columns attribute, but since that attribute was not compared in the equality check, Registry.apply_feature_view never persisted the new feature view. This led to the downstream failure. This PR fixes that bug.

Which issue(s) this PR fixes:

Fixes #

@adchia
Copy link
Collaborator

adchia commented May 11, 2022

can you describe what that bug was?

@codecov-commenter
Copy link

codecov-commenter commented May 11, 2022

Codecov Report

Merging #2673 (8eaa65c) into master (c5539fd) will increase coverage by 0.03%.
The diff coverage is 96.46%.

@@            Coverage Diff             @@
##           master    #2673      +/-   ##
==========================================
+ Coverage   80.19%   80.23%   +0.03%     
==========================================
  Files         167      167              
  Lines       14021    14108      +87     
==========================================
+ Hits        11244    11319      +75     
- Misses       2777     2789      +12     
Flag Coverage Δ
integrationtests 70.32% <61.50%> (-0.50%) ⬇️
unittests 58.74% <79.64%> (+0.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
sdk/python/feast/infra/provider.py 88.46% <ø> (ø)
sdk/python/feast/on_demand_feature_view.py 81.06% <0.00%> (-0.94%) ⬇️
sdk/python/tests/unit/test_feature_view.py 100.00% <ø> (ø)
sdk/python/feast/entity.py 90.00% <87.50%> (-0.42%) ⬇️
sdk/python/feast/inference.py 88.37% <93.75%> (+1.88%) ⬆️
sdk/python/feast/feature_logging.py 89.13% <100.00%> (-0.24%) ⬇️
sdk/python/feast/feature_store.py 88.21% <100.00%> (ø)
sdk/python/feast/feature_view.py 88.82% <100.00%> (+1.55%) ⬆️
sdk/python/feast/infra/offline_stores/file.py 95.26% <100.00%> (-0.03%) ⬇️
...python/feast/infra/offline_stores/offline_utils.py 94.62% <100.00%> (-0.12%) ⬇️
... and 27 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c5539fd...8eaa65c. Read the comment docs.

@felixwang9817 felixwang9817 changed the title chore: Deprecate value type chore: Deprecate value type [WIP] May 12, 2022
@felixwang9817 felixwang9817 force-pushed the deprecate_value_type branch 2 times, most recently from 13ff480 to aa48f4b Compare May 13, 2022 00:46
@felixwang9817 felixwang9817 changed the title chore: Deprecate value type [WIP] chore: Deprecate value type May 13, 2022
@@ -129,14 +129,15 @@ def __init__(
owner (optional): The owner of the feature view, typically the email of the
primary maintainer.
schema (optional): The schema of the feature view, including feature, timestamp,
and entity columns.
and entity columns. If entity columns are included in the schema, a List[Entity]
must be passed to `entities` instead of a List[str]; otherwise, the entity columns
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not the worst, but seems like we should able to avoid this for users by doing some entity name lookup no? Or is the idea that entity names are no longer unique

@pyalex
Copy link
Collaborator

pyalex commented May 16, 2022

/lgtm

Signed-off-by: Felix Wang <[email protected]>
Signed-off-by: Felix Wang <[email protected]>
Signed-off-by: Felix Wang <[email protected]>
Signed-off-by: Felix Wang <[email protected]>
Signed-off-by: Felix Wang <[email protected]>
Signed-off-by: Felix Wang <[email protected]>
Signed-off-by: Felix Wang <[email protected]>
Signed-off-by: Felix Wang <[email protected]>
Signed-off-by: Felix Wang <[email protected]>
Signed-off-by: Felix Wang <[email protected]>
Signed-off-by: Felix Wang <[email protected]>
Signed-off-by: Felix Wang <[email protected]>
Signed-off-by: Felix Wang <[email protected]>
@pyalex
Copy link
Collaborator

pyalex commented May 17, 2022

/lgtm

Signed-off-by: Felix Wang <[email protected]>
@feast-ci-bot feast-ci-bot removed the lgtm label May 17, 2022
Copy link
Member

@achals achals left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm except some minor version nits

warnings.warn(
(
"The `value_type` parameter is being deprecated. Instead, the type of an entity "
"should be specified as a Field in the schema of a feature view. Feast 0.22 and "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit 0.23

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

warnings.warn(
(
"The `entities` parameter should be a list of `Entity` objects. "
"Feast 0.22 and onwards will not support passing in a list of "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit 0.23

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

warnings.warn(
(
"The `entities` parameter should be a list of `Entity` objects. "
"Feast 0.22 and onwards will not support passing in a list of "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit 0.23

Copy link
Member

@achals achals left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

warnings.warn(
(
"The `value_type` parameter is being deprecated. Instead, the type of an entity "
"should be specified as a Field in the schema of a feature view. Feast 0.22 and "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit 0.23

@feast-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: achals, felixwang9817, pyalex

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [achals,felixwang9817]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@feast-ci-bot feast-ci-bot merged commit 9566299 into feast-dev:master May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants