File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change 99TOTAL_LOOPING_TIME = 10.0 # 10 second candidate benchmarking budget
1010COVERAGE_THRESHOLD = 60.0
1111MIN_TESTCASE_PASSED_THRESHOLD = 6
12+ REPEAT_OPTIMIZATION_PROBABILITY = 0.1
Original file line number Diff line number Diff line change 2828from codeflash .discovery .discover_unit_tests import discover_unit_tests
2929from codeflash .models .models import FunctionParent
3030from codeflash .telemetry .posthog_cf import ph
31+ from codeflash .code_utils .config_consts import REPEAT_OPTIMIZATION_PROBABILITY
3132
3233if TYPE_CHECKING :
3334 from libcst import CSTNode
@@ -506,6 +507,10 @@ def check_optimization_status(
506507 if path_key not in already_optimized_paths :
507508 filtered_functions [file_path ].append (func )
508509 remaining_count += 1
510+ else :
511+ if random .random () < REPEAT_OPTIMIZATION_PROBABILITY :
512+ filtered_functions [file_path ].append (func )
513+ remaining_count += 1
509514
510515 return dict (filtered_functions ), remaining_count
511516
You can’t perform that action at this time.
0 commit comments