diff --git a/sdk/python/feast/feature_view.py b/sdk/python/feast/feature_view.py index cdd507868d..344171745b 100644 --- a/sdk/python/feast/feature_view.py +++ b/sdk/python/feast/feature_view.py @@ -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) diff --git a/sdk/python/feast/type_map.py b/sdk/python/feast/type_map.py index 3bec457dcb..466993bb3d 100644 --- a/sdk/python/feast/type_map.py +++ b/sdk/python/feast/type_map.py @@ -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