From 8d79fea63e5b0165244d0f82ed041e6a4b3feaf7 Mon Sep 17 00:00:00 2001 From: ali Date: Fri, 12 Dec 2025 07:03:41 +0200 Subject: [PATCH] show progress bar while profiling the candidate --- codeflash/optimization/function_optimizer.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/codeflash/optimization/function_optimizer.py b/codeflash/optimization/function_optimizer.py index 3fda86489..860c2eaf1 100644 --- a/codeflash/optimization/function_optimizer.py +++ b/codeflash/optimization/function_optimizer.py @@ -535,9 +535,11 @@ def handle_successful_candidate( Returns the BestOptimization and optional benchmark tree. """ - line_profile_test_results = self.line_profiler_step( - code_context=code_context, original_helper_code=original_helper_code, candidate_index=candidate_index - ) + with progress_bar("Running line-by-line profiling"): + line_profile_test_results = self.line_profiler_step( + code_context=code_context, original_helper_code=original_helper_code, candidate_index=candidate_index + ) + eval_ctx.record_line_profiler_result(candidate.optimization_id, line_profile_test_results["str_out"]) replay_perf_gain = {}