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

Don't lose materialization interval tracking when re-applying feature views #1559

Merged

Conversation

jklegar
Copy link
Collaborator

@jklegar jklegar commented May 14, 2021

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

NONE

@jklegar
Copy link
Collaborator Author

jklegar commented May 14, 2021

/kind bug

@codecov-commenter
Copy link

codecov-commenter commented May 17, 2021

Codecov Report

Merging #1559 (61b6924) into master (8ac997c) will increase coverage by 5.86%.
The diff coverage is 93.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1559      +/-   ##
==========================================
+ Coverage   77.84%   83.70%   +5.86%     
==========================================
  Files          66       67       +1     
  Lines        5688     5850     +162     
==========================================
+ Hits         4428     4897     +469     
+ Misses       1260      953     -307     
Flag Coverage Δ
integrationtests 83.68% <93.75%> (?)
unittests 78.02% <93.75%> (+0.17%) ⬆️

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

Impacted Files Coverage Δ
sdk/python/feast/infra/gcp.py 83.60% <ø> (ø)
sdk/python/feast/registry.py 80.00% <84.21%> (+20.44%) ⬆️
sdk/python/feast/feature_store.py 92.51% <100.00%> (+1.10%) ⬆️
sdk/python/feast/feature_view.py 88.77% <100.00%> (+1.02%) ⬆️
sdk/python/feast/infra/local.py 96.73% <100.00%> (-0.14%) ⬇️
sdk/python/feast/utils.py 100.00% <100.00%> (ø)
sdk/python/tests/test_feature_store.py 100.00% <100.00%> (+37.50%) ⬆️
sdk/python/feast/repo_config.py 95.37% <0.00%> (+0.92%) ⬆️
... and 14 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 8ac997c...61b6924. Read the comment docs.

@@ -185,11 +185,60 @@ def updater(registry_proto: RegistryProto):
== feature_view_proto.spec.name
and existing_feature_view_proto.spec.project == project
):
# do not update if feature view has not changed; updating will erase tracked materialization intervals
Copy link
Member

Choose a reason for hiding this comment

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

It's not immediately clear to me what is happening here. Mind explaining?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, this function apply_feature_view does a "destructive update" - it erases tracked materialization intervals so as far as Feast is aware, no time interval of this feature view has been materialized yet. This is what we want if we changed the feature view, but if we didn't it'll cause unnecessary rematerializations. So this part just says don't do a destructive update if the feature view is exactly the same as what's already in the registry

@jklegar jklegar force-pushed the jacob_fix_materialization_tracking branch from 73e7c41 to c1db634 Compare June 1, 2021 19:15
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.

nits, but looks good otherwise.

sdk/python/feast/registry.py Outdated Show resolved Hide resolved
… views

Signed-off-by: Jacob Klegar <jacob@tecton.ai>
Signed-off-by: Jacob Klegar <jacob@tecton.ai>
Signed-off-by: Jacob Klegar <jacob@tecton.ai>
Signed-off-by: Jacob Klegar <jacob@tecton.ai>
Signed-off-by: Jacob Klegar <jacob@tecton.ai>
@jklegar jklegar force-pushed the jacob_fix_materialization_tracking branch from ac23456 to 61b6924 Compare June 4, 2021 21:58
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

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

@feast-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: achals, jklegar

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

@jklegar
Copy link
Collaborator Author

jklegar commented Jun 7, 2021

/ok-to-test

@feast-ci-bot feast-ci-bot merged commit 25daab3 into feast-dev:master Jun 7, 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.

writing to the registry - shall the provider do the write operation or should it live elsewhere?
5 participants