Skip to content

Commit

Permalink
chore: Construct FeatureView with timedelta instead of Duration object (
Browse files Browse the repository at this point in the history
#2445)

Signed-off-by: Felix Wang <[email protected]>
  • Loading branch information
felixwang9817 authored Mar 25, 2022
1 parent 3db4b1b commit 4cbf97b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions sdk/python/feast/feature_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,9 @@ def from_proto(cls, feature_view_proto: FeatureViewProto):
owner=feature_view_proto.spec.owner,
online=feature_view_proto.spec.online,
ttl=(
None
if feature_view_proto.spec.ttl.seconds == 0
and feature_view_proto.spec.ttl.nanos == 0
else feature_view_proto.spec.ttl
timedelta(days=0)
if feature_view_proto.spec.ttl.ToNanoseconds() == 0
else feature_view_proto.spec.ttl.ToTimedelta()
),
batch_source=batch_source,
stream_source=stream_source,
Expand Down

0 comments on commit 4cbf97b

Please sign in to comment.