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

Set created_timestamp and last_updated_timestamp fields #2266

Merged
merged 6 commits into from
Feb 2, 2022

Conversation

judahrand
Copy link
Member

@judahrand judahrand commented Feb 2, 2022

What this PR does / why we need it:

Both the BaseFeatureView and OnDemandFeatureView were missing this field, whereas FeatureView had it.

It was also not set when applying a FeatureView.

Which issue(s) this PR fixes:

Add the field where it is missing and actually set it when applying changes to the Registry.

Fixes #2267

Does this PR introduce a user-facing change?:

Fix bug where `last_updated_timestamp` were never set on FeatureViews.

@judahrand
Copy link
Member Author

/kind bug

@judahrand
Copy link
Member Author

/ok-to-test

@codecov-commenter
Copy link

codecov-commenter commented Feb 2, 2022

Codecov Report

Merging #2266 (5de401d) into master (6e30457) will increase coverage by 0.19%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2266      +/-   ##
==========================================
+ Coverage   85.82%   86.01%   +0.19%     
==========================================
  Files         116      116              
  Lines        9790     9809      +19     
==========================================
+ Hits         8402     8437      +35     
+ Misses       1388     1372      -16     
Flag Coverage Δ
integrationtests 74.80% <100.00%> (-0.10%) ⬇️
unittests 58.59% <66.66%> (+0.07%) ⬆️

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

Impacted Files Coverage Δ
sdk/python/feast/base_feature_view.py 78.94% <100.00%> (+0.68%) ⬆️
sdk/python/feast/feature_view.py 92.02% <100.00%> (+1.24%) ⬆️
sdk/python/feast/on_demand_feature_view.py 95.33% <100.00%> (+0.12%) ⬆️
sdk/python/feast/registry.py 85.17% <100.00%> (+0.67%) ⬆️
.../integration/online_store/test_universal_online.py 97.50% <0.00%> (-0.42%) ⬇️
sdk/python/feast/saved_dataset.py 82.45% <0.00%> (+1.75%) ⬆️
sdk/python/feast/infra/online_stores/datastore.py 90.56% <0.00%> (+1.88%) ⬆️
sdk/python/feast/feature_service.py 86.27% <0.00%> (+3.92%) ⬆️
sdk/python/feast/entity.py 78.40% <0.00%> (+4.00%) ⬆️

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 6e30457...5de401d. Read the comment docs.

@feast-ci-bot feast-ci-bot added size/M and removed size/S labels Feb 2, 2022
@judahrand judahrand changed the title Add last_updated_timestamp to BaseFeatureView Set created_timestamp and last_updated_timestamp fields Feb 2, 2022
Copy link
Collaborator

@adchia adchia left a comment

Choose a reason for hiding this comment

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

/lgtm

@@ -47,6 +48,8 @@ class OnDemandFeatureView(BaseFeatureView):
input_feature_view_projections: Dict[str, FeatureViewProjection]
input_request_data_sources: Dict[str, RequestDataSource]
udf: MethodType
created_timestamp: Optional[datetime] = None
Copy link
Member

Choose a reason for hiding this comment

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

The args above arent updated btw

Copy link
Member Author

Choose a reason for hiding this comment

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

What do you mean? The other FeatureView classes don't take it in __init__. I was just making sure they all matched in terms of behaviour.

Arguably, this setting of created_timestamp to None should maybe be inherited behaviour.

Copy link
Member

@woop woop Feb 2, 2022

Choose a reason for hiding this comment

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

I mean the docstring. I also think this logic should ideally be inherited.

Copy link
Member Author

Choose a reason for hiding this comment

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

Still not sure what you mean 🤔 The Docstring shouldn't mention this should it as it isn't an arg?

Copy link
Member Author

Choose a reason for hiding this comment

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

Turns out this logic was already performed by the parent class. The logic must've been left in accidentally.

@woop
Copy link
Member

woop commented Feb 2, 2022

On a different note, it's kind of weird how we have both created_timestamp for the original creation metadata of an object, as well as the timestamp field name when deduplicating source rows. I think we should maybe make the former just created and last_updated or something. Doesnt have to happen now though.

@feast-ci-bot feast-ci-bot removed the lgtm label Feb 2, 2022
Copy link
Collaborator

@felixwang9817 felixwang9817 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: adchia, felixwang9817, judahrand

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 [adchia,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 a3073ec into feast-dev:master Feb 2, 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.

created_timestamp and last_updated_timestamp are never set
6 participants