(self, file_path = None)
| 549 | raise ValueError("Cannot find the file path for test cases.") |
| 550 | |
| 551 | def load_groundtruths(self, file_path = None): |
| 552 | if file_path != None: |
| 553 | data = json.load(open(file_path, "r")) |
| 554 | self.prompt2groundtruth = data["prompt2groundtruth"] |
| 555 | self.prompt2io = data["prompt2io"] |
| 556 | elif self.data_path != None: |
| 557 | data = json.load(open(os.path.join(self.data_path, "solutions.json"), "r")) |
| 558 | self.prompt2groundtruth = data["prompt2groundtruth"] |
| 559 | self.prompt2io = data["prompt2io"] |
| 560 | else: |
| 561 | raise ValueError("Cannot find the file path for test cases.") |
| 562 | |
| 563 | def remove_solutions_with_similar_time_costs(self, threshold = 0.1): |
| 564 | self.load_groundtruths() |
no outgoing calls
no test coverage detected