Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix test
Signed-off-by: Achal Shah <achals@gmail.com>
  • Loading branch information
achals committed Jun 28, 2021
commit 6d4006341d37ac77766ddb397d6d04189dcae0d0
11 changes: 6 additions & 5 deletions sdk/python/feast/feature_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ def to_proto(self) -> FeatureViewProto:
ttl_duration = Duration()
ttl_duration.FromTimedelta(self.ttl)

print(f"Stream soruce: {self.stream_source}, {type(self.stream_source)}")

spec = FeatureViewSpecProto(
name=self.name,
entities=self.entities,
Expand Down Expand Up @@ -205,6 +207,9 @@ def from_proto(cls, feature_view_proto: FeatureViewProto):
"""

_input = DataSource.from_proto(feature_view_proto.spec.batch_source)
stream_source = DataSource.from_proto(feature_view_proto.spec.stream_source)\
if feature_view_proto.spec.HasField("stream_source") \
else None
feature_view = cls(
name=feature_view_proto.spec.name,
entities=[entity for entity in feature_view_proto.spec.entities],
Expand All @@ -226,11 +231,7 @@ def from_proto(cls, feature_view_proto: FeatureViewProto):
),
input=_input,
batch_source=_input,
stream_source=(
feature_view_proto.spec.stream_source
if feature_view_proto.spec.stream_source is not None
else None
),
stream_source=stream_source,
)

feature_view.created_timestamp = feature_view_proto.meta.created_timestamp
Expand Down