Skip to content

Commit 431b83e

Browse files
committed
add doc string
1 parent 550a603 commit 431b83e

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

python/hsfs/core/online_store_rest_client_engine.py

+19-4
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,17 @@ def __init__(
8989
)
9090

9191
def get_feature_to_decode(self, features: List[td_feature_mod.TrainingDatasetFeature]) -> Dict[int, str]:
92-
"""Get the feature to decode from the RonDB Rest Server Feature Store API.
93-
92+
"""Get a mapping of feature indices to their types for features that need decoding.
93+
94+
This method identifies features that have types requiring special decoding from the RonDB Rest Server
95+
response and maps their position in the ordered feature list to their type.
96+
97+
# Arguments
98+
features: List of TrainingDatasetFeature objects containing feature metadata
99+
100+
# Returns
101+
Dict[int, str]: A dictionary mapping feature indices to their type strings for features
102+
that require decoding. The indices correspond to the position in _ordered_feature_names.
94103
"""
95104
feature_to_decode = {}
96105
for feat in features:
@@ -145,8 +154,14 @@ def build_base_payload(
145154
return base_payload
146155

147156
def decode_rdrs_feature_values(self, feature_values: List[Any]) -> List[Any]:
148-
"""Decode the response from the RonDB Rest Server Feature Store API.
149-
157+
"""Decode binary and date values from the RonDB Rest Server response.
158+
159+
# Arguments:
160+
feature_values: List of feature values from the RonDB Rest Server
161+
162+
# Returns:
163+
List of decoded feature values with binary values base64 decoded and date strings
164+
converted to datetime.date objects
150165
"""
151166
for feature_index, data_type in self._feature_to_decode.items():
152167
if data_type == self.BINARY_TYPE and feature_values[feature_index] is not None:

0 commit comments

Comments
 (0)