Skip to content

Commit 0640c22

Browse files
committed
fix(ci): make import profiler checks warning-only and non-blocking
1 parent edc0423 commit 0640c22

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

ci/run_single_test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ case ${TEST_TYPE} in
139139
pip install -e .
140140

141141
if [ -f "${BASELINE_CSV}" ]; then
142-
python ${PROFILER_SCRIPT} --package ${PACKAGE_NAME} --iterations 11 --fail-threshold 5000 --diff-baseline "${BASELINE_CSV}" --diff-threshold 100
142+
python ${PROFILER_SCRIPT} --package ${PACKAGE_NAME} --iterations 11 --fail-threshold 20000 --diff-baseline "${BASELINE_CSV}" --diff-threshold 100
143143
else
144-
python ${PROFILER_SCRIPT} --package ${PACKAGE_NAME} --iterations 11 --fail-threshold 5000
144+
python ${PROFILER_SCRIPT} --package ${PACKAGE_NAME} --iterations 11 --fail-threshold 20000
145145
fi
146146
retval=$?
147147
deactivate

scripts/import_profiler/profiler.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -266,10 +266,9 @@ def run_master(iterations, target_module, cpu=0, csv_path=None, clear_cache=True
266266
relative_diff_threshold = 0.15 * baseline_p50
267267
if diff > diff_threshold and diff > relative_diff_threshold:
268268
final_messages.append(
269-
f"FAILURE: Import time regression of {diff:.2f} ms exceeds both the absolute threshold ({diff_threshold} ms) "
269+
f"WARNING: Import time regression of {diff:.2f} ms exceeds both the absolute threshold ({diff_threshold} ms) "
270270
f"and the relative threshold ({relative_diff_threshold:.2f} ms, 15% of baseline Median)."
271271
)
272-
exit_code = 1
273272
else:
274273
if diff > diff_threshold:
275274
final_messages.append(f"SUCCESS: Import time regression of {diff:.2f} ms exceeds absolute threshold ({diff_threshold} ms) but is within relative threshold ({relative_diff_threshold:.2f} ms, 15%).")
@@ -281,10 +280,9 @@ def run_master(iterations, target_module, cpu=0, csv_path=None, clear_cache=True
281280
if fail_threshold is not None:
282281
if p50_time > fail_threshold:
283282
if baseline_p50 is not None and baseline_p50 > fail_threshold:
284-
final_messages.append(f"WARNING: Median import time ({p50_time:.2f} ms) exceeds the absolute failure threshold ({fail_threshold} ms), but the baseline ({baseline_p50:.2f} ms) also exceeded it. Bypassing absolute backstop failure.")
283+
final_messages.append(f"WARNING: Median import time ({p50_time:.2f} ms) exceeds the absolute threshold ({fail_threshold} ms), and the baseline ({baseline_p50:.2f} ms) also exceeded it.")
285284
else:
286-
final_messages.append(f"FAILURE: Median import time ({p50_time:.2f} ms) exceeds the failure threshold ({fail_threshold} ms).")
287-
exit_code = 1
285+
final_messages.append(f"WARNING: Median import time ({p50_time:.2f} ms) exceeds the threshold ({fail_threshold} ms).")
288286
else:
289287
final_messages.append(f"SUCCESS: Median import time ({p50_time:.2f} ms) is within the failure threshold ({fail_threshold} ms).")
290288

0 commit comments

Comments
 (0)