Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: Achal Shah <achals@gmail.com>
  • Loading branch information
achals committed Jun 28, 2021
1 parent 81d6d41 commit 6d40063
Showing 1 changed file with 6 additions and 5 deletions.
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

0 comments on commit 6d40063

Please sign in to comment.