Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 6 additions & 0 deletions sdk/python/feast/feature_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,12 @@ def from_proto(cls, feature_view_proto: FeatureViewProto):
for field_proto in feature_view_proto.spec.entity_columns
]

if len(feature_view.entities) != len(feature_view.entity_columns):
warnings.warn(
f"There are some mismatches in your feature view's registered entities. Please check if you have applied your entities correctly."
f"Entities: {feature_view.entities} vs Entity Columns: {feature_view.entity_columns}"
)

# FeatureViewProjections are not saved in the FeatureView proto.
# Create the default projection.
feature_view.projection = FeatureViewProjection.from_definition(feature_view)
Expand Down
2 changes: 2 additions & 0 deletions sdk/python/feast/type_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,8 @@ def _python_datetime_to_int_timestamp(
int_timestamps.append(int(value.ToSeconds()))
elif isinstance(value, np.datetime64):
int_timestamps.append(value.astype("datetime64[s]").astype(np.int_))
elif isinstance(value, type(np.nan)):
int_timestamps.append(NULL_TIMESTAMP_INT_VALUE)
else:
int_timestamps.append(int(value))
return int_timestamps
Expand Down