@@ -102,6 +102,7 @@ def __init__(
102102 features : Optional [List [tdf_mod .TrainingDatasetFeature ]] = None ,
103103 serving_keys : Optional [List [sk_mod .ServingKey ]] = None ,
104104 skip_fg_ids : Optional [Set [int ]] = None ,
105+ skip_feature_decoding_fg_ids : Optional [Set [int ]] = None ,
105106 feature_store_name : Optional [str ] = None ,
106107 feature_view_name : Optional [str ] = None ,
107108 feature_view_version : Optional [int ] = None ,
@@ -178,6 +179,7 @@ def __init__(
178179 self .__all_features_on_demand : Optional [bool ] = None
179180 self .__all_feature_groups_online : Optional [bool ] = None
180181 self ._feature_view_logging_enabled : bool = False
182+ self ._skip_feature_decoding_fg_ids = skip_feature_decoding_fg_ids or set ()
181183
182184 def init_serving (
183185 self ,
@@ -1518,11 +1520,13 @@ def apply_return_value_handlers(
15181520 return row_dict
15191521
15201522 def build_complex_feature_decoders (self ) -> Dict [str , Callable ]:
1521- """Build a dictionary of functions to deserialize or convert feature values .
1523+ """Build decoders for complex features .
15221524
1523- Handles:
1524- - deserialization of complex features from the online feature store
1525- - conversion of string or int timestamps to datetime objects
1525+ Decodes feature values for features marked as complex (e.g., structs, arrays, maps)
1526+ that are stored in the online store as Avro-encoded payloads (bytes or base64 strings).
1527+ Values already provided as native Python objects (e.g., via passed_features or REST)
1528+ are returned unchanged. Embedding vectors are already deserialized, but complex features
1529+ stored in OpenSearch must be deserialized here. Timestamp conversion is handled separately.
15261530 """
15271531 if not HAS_AVRO :
15281532 raise ModuleNotFoundError (avro_not_installed_message )
@@ -1536,7 +1540,7 @@ def build_complex_feature_decoders(self) -> Dict[str, Callable]:
15361540 )
15371541 )
15381542 for f in self ._features
1539- if f .is_complex ()
1543+ if f .is_complex () and f . feature_group . id not in self . _skip_feature_decoding_fg_ids
15401544 }
15411545
15421546 if len (complex_feature_schemas ) == 0 :
0 commit comments