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

Changed FVProjection 'name_to_use' field to 'name_alias' and changed '.set_projection' in FeatureView to ".with_projection". Also adjustments for some edge cases #1929

Merged
merged 1 commit into from
Oct 8, 2021

Conversation

mavysavydav
Copy link
Collaborator

@mavysavydav mavysavydav commented Oct 8, 2021

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

What this PR does / why we need it: Better style and the change to "with_projection" makes it harder to make mistakes. Adjustments for some edge cases like the following:

FeatureService(
    ...
    features=[
        my_fv[[feature_a]],
        my_fv[[feature_b]].with_name("fv_2")
   ]  
    ...
)

won't work unless get_items() returns a copy of the FV rather than just editing the projection. In this example, when my_fv[[feature_b]] is invoked, it overrides the feature subset in the projection for my_fv[[feature_a]].

…ments

Signed-off-by: David Y Liu <davidyliuliu@gmail.com>
@feast-ci-bot
Copy link
Collaborator

Hi @mavysavydav. Thanks for your PR.

I'm waiting for a feast-dev member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@codecov-commenter
Copy link

codecov-commenter commented Oct 8, 2021

Codecov Report

Merging #1929 (01b04a3) into master (d0778f7) will decrease coverage by 22.07%.
The diff coverage is 24.56%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #1929       +/-   ##
===========================================
- Coverage   81.95%   59.87%   -22.08%     
===========================================
  Files          96       96               
  Lines        7557     7576       +19     
===========================================
- Hits         6193     4536     -1657     
- Misses       1364     3040     +1676     
Flag Coverage Δ
integrationtests ?
unittests 59.87% <24.56%> (-0.06%) ⬇️

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

Impacted Files Coverage Δ
...python/feast/infra/offline_stores/offline_utils.py 46.15% <ø> (-43.96%) ⬇️
sdk/python/feast/feature_view.py 74.41% <11.11%> (-9.92%) ⬇️
sdk/python/feast/on_demand_feature_view.py 31.38% <12.00%> (-54.77%) ⬇️
sdk/python/feast/feature_store.py 75.98% <50.00%> (-18.20%) ⬇️
sdk/python/feast/infra/provider.py 84.16% <50.00%> (-5.84%) ⬇️
sdk/python/feast/feature_view_projection.py 68.00% <100.00%> (-32.00%) ⬇️
.../integration/online_store/test_universal_online.py 14.58% <0.00%> (-85.42%) ⬇️
.../integration/online_store/test_online_retrieval.py 17.39% <0.00%> (-82.61%) ⬇️
sdk/python/tests/utils/online_read_write_test.py 18.18% <0.00%> (-81.82%) ⬇️
...fline_store/test_universal_historical_retrieval.py 18.69% <0.00%> (-80.49%) ⬇️
... and 51 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 d0778f7...01b04a3. Read the comment docs.

@mavysavydav mavysavydav changed the title Changed FVProjection 'name_to_use' field to 'name_alias' and changed 'set_projection' in FeatureView to "view_projection" Changed FVProjection 'name_to_use' field to 'name_alias' and changed 'set_projection' in FeatureView to "with_projection" Oct 8, 2021
@mavysavydav mavysavydav changed the title Changed FVProjection 'name_to_use' field to 'name_alias' and changed 'set_projection' in FeatureView to "with_projection" Changed FVProjection 'name_to_use' field to 'name_alias' and changed '.set_projection' in FeatureView to ".with_projection" Oct 8, 2021
@mavysavydav mavysavydav changed the title Changed FVProjection 'name_to_use' field to 'name_alias' and changed '.set_projection' in FeatureView to ".with_projection" Changed FVProjection 'name_to_use' field to 'name_alias' and changed '.set_projection' in FeatureView to ".with_projection" + adjustments for some edge cases Oct 8, 2021
@mavysavydav mavysavydav changed the title Changed FVProjection 'name_to_use' field to 'name_alias' and changed '.set_projection' in FeatureView to ".with_projection" + adjustments for some edge cases Changed FVProjection 'name_to_use' field to 'name_alias' and changed '.set_projection' in FeatureView to ".with_projection". Also adjustments for some edge cases Oct 8, 2021
od_fvs[fv_name].set_projection(projection)
od_fvs_to_use.append(
od_fvs[fv_name].with_projection(copy.copy(projection))
)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

these changes made b/c of the possibility of having multiple same feature views with different projections

@feast-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

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

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

@woop
Copy link
Member

woop commented Oct 8, 2021

/lgtm

@feast-ci-bot feast-ci-bot merged commit 314447f into feast-dev:master Oct 8, 2021
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.

4 participants