Skip to content

Commit

Permalink
Set value_type of entity directly in from_proto
Browse files Browse the repository at this point in the history
Signed-off-by: hkuepers <[email protected]>
  • Loading branch information
hkuepers committed Feb 25, 2025
1 parent e25ca4f commit 632312c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sdk/python/feast/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,13 @@ def from_proto(cls, entity_proto: EntityProto):
"""
entity = cls(
name=entity_proto.spec.name,
valuetType=ValueType(entity_proto.spec.value_type),
join_keys=[entity_proto.spec.join_key],
description=entity_proto.spec.description,
tags=dict(entity_proto.spec.tags),
owner=entity_proto.spec.owner,
)

entity.value_type = ValueType(entity_proto.spec.value_type)

if entity_proto.meta.HasField("created_timestamp"):
entity.created_timestamp = entity_proto.meta.created_timestamp.ToDatetime()
if entity_proto.meta.HasField("last_updated_timestamp"):
Expand Down

0 comments on commit 632312c

Please sign in to comment.