Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions codeflash/code_utils/config_consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
N_TESTS_TO_GENERATE = 2
TOTAL_LOOPING_TIME = 10.0 # 10 second candidate benchmarking budget
COVERAGE_THRESHOLD = 60.0
MIN_TESTCASE_PASSED_THRESHOLD = 6
4 changes: 2 additions & 2 deletions codeflash/result/critic.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from codeflash.cli_cmds.console import logger
from codeflash.code_utils import env_utils
from codeflash.code_utils.config_consts import COVERAGE_THRESHOLD, MIN_IMPROVEMENT_THRESHOLD
from codeflash.code_utils.config_consts import COVERAGE_THRESHOLD, MIN_IMPROVEMENT_THRESHOLD, MIN_TESTCASE_PASSED_THRESHOLD
from codeflash.models.models import TestType

if TYPE_CHECKING:
Expand Down Expand Up @@ -50,7 +50,7 @@ def quantity_of_tests_critic(candidate_result: OptimizedCandidateResult) -> bool
for test_type in report:
pass_count += report[test_type]["passed"]

if pass_count >= 4:
if pass_count >= MIN_TESTCASE_PASSED_THRESHOLD:
return True
# If only one test passed, check if it's a REPLAY_TEST
return bool(pass_count == 1 and report[TestType.REPLAY_TEST]["passed"] == 1)
Expand Down
Loading