You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app/processors/metrics_collector.py
+30Lines changed: 30 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -194,6 +194,36 @@ def concat_trainer_exports(
194
194
returncombined
195
195
196
196
197
+
defconcat_json_lists(
198
+
data_file_paths: List[str],
199
+
combined_data_file_path: Optional[str] =None,
200
+
) ->Union[List[Dict[str, Any]], str]:
201
+
"""
202
+
Concatenates multiple json list files into a single combined file.
203
+
204
+
Args:
205
+
data_file_paths (List[str]): List of paths to files each containing a json list.
206
+
combined_data_file_path (Optional[str]): The file path where the combined data will be saved. If None, the combined data will be returned as a list.
207
+
208
+
209
+
Returns:
210
+
Union[List[Dict[str, Any]], str]: The path to the combined data file if `combined_data_file_path` is provided, or the combined data as a list otherwise.
0 commit comments