Combine all evaluation results into a single file. Args: output_folder (str): Directory to store the combined file. combined_file (str): Name of the combined file. results (Dict[str, Dict]): Dictionary of evaluation results with file names as keys. Returns:
(output_folder: str, combined_file: str, results: Dict[str, Dict])
| 22 | |
| 23 | |
| 24 | def combine_results(output_folder: str, combined_file: str, results: Dict[str, Dict]) -> None: |
| 25 | """ |
| 26 | Combine all evaluation results into a single file. |
| 27 | |
| 28 | Args: |
| 29 | output_folder (str): Directory to store the combined file. |
| 30 | combined_file (str): Name of the combined file. |
| 31 | results (Dict[str, Dict]): Dictionary of evaluation results with file names as keys. |
| 32 | |
| 33 | Returns: |
| 34 | None |
| 35 | """ |
| 36 | combined_path = os.path.join(output_folder, combined_file) |
| 37 | with open(combined_path, 'w') as output_file: |
| 38 | json.dump(results, output_file, indent=4) |
| 39 | |
| 40 | |
| 41 | def save_individual_result(output_folder: str, file_name: str, result: Dict) -> None: |