Skip to content

Commit 890243c

Browse files
Merge pull request #968 from codeflash-ai/fix/show-progress-while-profiling-code
Show Progress while profiling the candidate
2 parents a879f11 + 8d79fea commit 890243c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

codeflash/optimization/function_optimizer.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -535,9 +535,11 @@ def handle_successful_candidate(
535535
536536
Returns the BestOptimization and optional benchmark tree.
537537
"""
538-
line_profile_test_results = self.line_profiler_step(
539-
code_context=code_context, original_helper_code=original_helper_code, candidate_index=candidate_index
540-
)
538+
with progress_bar("Running line-by-line profiling"):
539+
line_profile_test_results = self.line_profiler_step(
540+
code_context=code_context, original_helper_code=original_helper_code, candidate_index=candidate_index
541+
)
542+
541543
eval_ctx.record_line_profiler_result(candidate.optimization_id, line_profile_test_results["str_out"])
542544

543545
replay_perf_gain = {}

0 commit comments

Comments
 (0)