File tree 1 file changed +19
-4
lines changed
1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -89,8 +89,17 @@ def __init__(
89
89
)
90
90
91
91
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.
94
103
"""
95
104
feature_to_decode = {}
96
105
for feat in features :
@@ -145,8 +154,14 @@ def build_base_payload(
145
154
return base_payload
146
155
147
156
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
150
165
"""
151
166
for feature_index , data_type in self ._feature_to_decode .items ():
152
167
if data_type == self .BINARY_TYPE and feature_values [feature_index ] is not None :
You can’t perform that action at this time.
0 commit comments