Skip to content

Commit

Permalink
adding warnings for transformation functions in external feature grou…
Browse files Browse the repository at this point in the history
…p and updating logger message
  • Loading branch information
manu-sj committed Oct 25, 2024
1 parent 45fa5bb commit ebeba91
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
19 changes: 12 additions & 7 deletions python/hsfs/core/feature_group_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,18 @@ def save(
)

# Currently on-demand transformation functions not supported in external feature groups.
if (
not isinstance(feature_group, fg.ExternalFeatureGroup)
and feature_group.transformation_functions
):
feature_dataframe = engine.get_instance()._apply_transformation_function(
feature_group.transformation_functions, feature_dataframe
)
if feature_group.transformation_functions:
if not isinstance(feature_group, fg.ExternalFeatureGroup):
feature_dataframe = (
engine.get_instance()._apply_transformation_function(
feature_group.transformation_functions, feature_dataframe
)
)
else:
warnings.warn(
"On-Demand features were not created because On-Demand Transformations are not supported for External Feature Groups.",
stacklevel=1,
)

util.validate_embedding_feature_type(
feature_group.embedding_index, dataframe_features
Expand Down
2 changes: 1 addition & 1 deletion python/hsfs/core/vector_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -1326,7 +1326,7 @@ def identify_missing_features_pre_fetch(
if self._on_demand_feature_names and len(self._on_demand_feature_names) > 0:
# Remove on-demand features from validation check as they would be computed.
_logger.debug(
"_on_demand_feature_names for pre-fetch missing : %s",
"Appending on_demand_feature_names to passed_feature_names for pre-fetch missing : %s",
vector_db_features,
)
passed_feature_names = passed_feature_names.union(
Expand Down

0 comments on commit ebeba91

Please sign in to comment.