Skip to content

Commit 9f9fc30

Browse files
committed
Update critic.py
1 parent 602b2c1 commit 9f9fc30

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

codeflash/result/critic.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,8 @@ def speedup_critic(
4040
The noise floor is doubled when benchmarking on a (noisy) GitHub Action virtual instance, also we want to be more confident there.
4141
"""
4242
noise_floor = 3 * MIN_IMPROVEMENT_THRESHOLD if original_code_runtime < 10000 else MIN_IMPROVEMENT_THRESHOLD
43-
if not disable_gh_action_noise:
44-
in_github_actions_mode = bool(env_utils.get_pr_number())
45-
if in_github_actions_mode:
46-
noise_floor = noise_floor * 2 # Increase the noise floor in GitHub Actions mode
43+
if not disable_gh_action_noise and env_utils.is_ci():
44+
noise_floor = noise_floor * 2 # Increase the noise floor in GitHub Actions mode
4745

4846
perf_gain = performance_gain(
4947
original_runtime_ns=original_code_runtime, optimized_runtime_ns=candidate_result.best_test_runtime

0 commit comments

Comments
 (0)