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

Properly exclude entities from feature inference #2048

Merged
merged 3 commits into from
Nov 18, 2021

Conversation

mavysavydav
Copy link
Collaborator

Fix to correctly exclude entity columns from being considered features when using feature inference during registration.

…d as features

Signed-off-by: David Y Liu <davidyliuliu@gmail.com>
fv.batch_source.event_timestamp_column,
fv.batch_source.created_timestamp_column,
} | {
entity_name_to_join_key_map[entity_name] for entity_name in fv.entities
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is the line that changed from the previous version of this method. Grabbing the join_keys to exclude rather than entity name. Everything else is mainly copy and paste.

Copy link
Member

Choose a reason for hiding this comment

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

@mavysavydav is there a reason for the move to inference.py? I am not against it, but it makes reviewing the PR harder. Would it make sense to at least split these two changes into different commits to make it easier on the reviewer?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yea i agree that review becomes more difficult. I had to move this method as part of this fix b/c it needs the list of entity objects which isn't available in feature_view.py. I can split out the odfv method move into a separate PR since that's more independent if you'd like

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

have taken out the odfv code move

RegistryInferenceFailure: The set of features could not be inferred.
"""
for odfv in odfvs:
df = pd.DataFrame()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this method is basically the same, just moved to this file from on_demand_feature_views.py for consistency, and adjusted it's signature to be consistent with other inference methods

@codecov-commenter
Copy link

codecov-commenter commented Nov 17, 2021

Codecov Report

Merging #2048 (886d788) into master (7032559) will increase coverage by 24.95%.
The diff coverage is 88.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #2048       +/-   ##
===========================================
+ Coverage   57.54%   82.50%   +24.95%     
===========================================
  Files         100      100               
  Lines        8028     8465      +437     
===========================================
+ Hits         4620     6984     +2364     
+ Misses       3408     1481     -1927     
Flag Coverage Δ
integrationtests 73.75% <66.66%> (?)
unittests 58.64% <80.00%> (+1.09%) ⬆️

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

Impacted Files Coverage Δ
sdk/python/feast/feature_view.py 89.28% <ø> (+11.92%) ⬆️
sdk/python/tests/conftest.py 92.20% <ø> (+22.07%) ⬆️
sdk/python/feast/inference.py 87.50% <81.25%> (+30.35%) ⬆️
sdk/python/feast/feature_store.py 85.87% <100.00%> (+14.74%) ⬆️
...sts/integration/registration/test_feature_store.py 99.31% <100.00%> (+29.45%) ⬆️
...n/tests/integration/registration/test_inference.py 100.00% <100.00%> (+33.33%) ⬆️
sdk/python/feast/online_response.py 87.71% <0.00%> (+1.75%) ⬆️
sdk/python/feast/repo_operations.py 46.06% <0.00%> (+2.11%) ⬆️
sdk/python/feast/infra/online_stores/sqlite.py 96.77% <0.00%> (+2.15%) ⬆️
sdk/python/feast/feature.py 72.72% <0.00%> (+3.03%) ⬆️
... and 56 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 7032559...886d788. Read the comment docs.

Copy link
Contributor

@codyjlin codyjlin left a comment

Choose a reason for hiding this comment

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

Thanks for this fix David!! Much needed.

@feast-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: codyjlin, mavysavydav

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:

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

@mavysavydav
Copy link
Collaborator Author

/ok-to-test

Signed-off-by: David Y Liu <davidyliuliu@gmail.com>
Signed-off-by: David Y Liu <davidyliuliu@gmail.com>
@achals
Copy link
Member

achals commented Nov 18, 2021

/lgtm

@feast-ci-bot feast-ci-bot merged commit 63652e0 into master Nov 18, 2021
codyjlin pushed a commit to twitter-forks/feast that referenced this pull request Nov 19, 2021
* Proper fixes for consistency and to make sure entities aren't inferred as features

Signed-off-by: David Y Liu <davidyliuliu@gmail.com>

* Leaving out ODFV inference logic move for a different PR

Signed-off-by: David Y Liu <davidyliuliu@gmail.com>

* updated tests

Signed-off-by: David Y Liu <davidyliuliu@gmail.com>
(cherry picked from commit 63652e0)
@adchia adchia deleted the mavysavydav-patch-1 branch February 3, 2022 17:12
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