Skip to content

Commit 90b12a0

Browse files
committed
remove evt time and minor updates
1 parent 1ccee82 commit 90b12a0

File tree

3 files changed

+8
-21
lines changed

3 files changed

+8
-21
lines changed

python/hsfs/core/feature_group_engine.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,10 @@ def save(
106106
feature_group.embedding_index, dataframe_features
107107
)
108108

109-
if feature_group.online_enabled and validation_options.get(
110-
"run_validation", False
109+
if (
110+
feature_group.online_enabled
111+
and not feature_group.embedding_index
112+
and validation_options.get("run_validation", False)
111113
):
112114
# validate df schema
113115
dataframe_features = DataFrameValidator().validate_schema(
@@ -187,8 +189,10 @@ def insert(
187189
feature_group.embedding_index, dataframe_features
188190
)
189191

190-
if feature_group.online_enabled and validation_options.get(
191-
"run_validation", False
192+
if (
193+
feature_group.online_enabled
194+
and not feature_group.embedding_index
195+
and validation_options.get("run_validation", False)
192196
):
193197
# validate df schema
194198
dataframe_features = DataFrameValidator().validate_schema(

python/hsfs/core/schema_validation.py

-6
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,6 @@ def validate_schema(self, feature_group, df, df_features):
5252
raise ValueError(
5353
f"Primary key column {pk} is missing in input dataframe"
5454
)
55-
# Check if the event time column exists
56-
if feature_group.event_time and feature_group.event_time not in df.columns:
57-
raise ValueError(
58-
f"Event time column {feature_group.event_time} is missing in input dataframe"
59-
)
60-
6155
# Execute data type specific validation
6256
errors, column_lengths, is_pk_null, is_string_length_exceeded = (
6357
self._validate_df_specifics(feature_group, df, bool(feature_group.id))

python/tests/test_schema_validator.py

-11
Original file line numberDiff line numberDiff line change
@@ -125,17 +125,6 @@ def test_validate_schema_primary_key_missing(self, pandas_df, feature_group_data
125125
feature_group_data, pandas_df, feature_group_data.features
126126
)
127127

128-
def test_validate_schema_event_time_missing(self, pandas_df, feature_group_data):
129-
EVT_TIME = "missing_event_time"
130-
feature_group_data.event_time = EVT_TIME
131-
with pytest.raises(
132-
ValueError,
133-
match=f"Event time column {EVT_TIME} is missing in input dataframe",
134-
):
135-
DataFrameValidator().validate_schema(
136-
feature_group_data, pandas_df, feature_group_data.features
137-
)
138-
139128
def test_validate_schema_primary_key_null(self, pandas_df, feature_group_data):
140129
pandas_df.loc[0, "primary_key"] = None
141130
with pytest.raises(

0 commit comments

Comments
 (0)