Skip to content

Commit d0aa3d6

Browse files
committed
fix lint
Signed-off-by: hao-xu5 <hxu44@apple.com>
1 parent 8d8dcde commit d0aa3d6

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎sdk/python/feast/on_demand_feature_view.py‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ def to_proto(self) -> OnDemandFeatureViewProto:
348348
owner=self.owner,
349349
write_to_online_store=self.write_to_online_store,
350350
singleton=self.singleton if self.singleton else False,
351+
aggregations=self.aggregations
351352
)
352353
return OnDemandFeatureViewProto(spec=spec, meta=meta)
353354

@@ -457,6 +458,12 @@ def from_proto(
457458
if hasattr(on_demand_feature_view_proto.spec, "singleton"):
458459
singleton = on_demand_feature_view_proto.spec.singleton
459460

461+
aggregations = []
462+
if hasattr(on_demand_feature_view_proto.spec, "aggregations"):
463+
aggregations = [
464+
Aggregation.from_proto(aggregation_proto)
465+
for aggregation_proto in on_demand_feature_view_proto.spec.aggregations
466+
]
460467
on_demand_feature_view_obj = cls(
461468
name=on_demand_feature_view_proto.spec.name,
462469
schema=[
@@ -477,6 +484,7 @@ def from_proto(
477484
owner=on_demand_feature_view_proto.spec.owner,
478485
write_to_online_store=write_to_online_store,
479486
singleton=singleton,
487+
aggregations=aggregations
480488
)
481489

482490
on_demand_feature_view_obj.entities = entities

0 commit comments

Comments
 (0)