File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -649,16 +649,14 @@ def determine_best_candidate(
649649 if self .args .benchmark and benchmark_tree :
650650 console .print (benchmark_tree )
651651 console .rule ()
652-
653- self .write_code_and_helpers (
654- self .function_to_optimize_source_code , original_helper_code , self .function_to_optimize .file_path
655- )
656652 except KeyboardInterrupt as e :
653+ logger .exception (f"Optimization interrupted: { e } " )
654+ raise
655+ finally :
656+ # reset for the next candidate
657657 self .write_code_and_helpers (
658658 self .function_to_optimize_source_code , original_helper_code , self .function_to_optimize .file_path
659659 )
660- logger .exception (f"Optimization interrupted: { e } " )
661- raise
662660 if not valid_optimizations :
663661 return None
664662 # need to figure out the best candidate here before we return best_optimization
You can’t perform that action at this time.
0 commit comments