Skip to content

Commit 06830ed

Browse files
file name for best candidate
1 parent 42c4652 commit 06830ed

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

codeflash/optimization/function_optimizer.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ def generate_and_instrument_tests(
339339
logger.info(f"Generated test {i + 1}/{count_tests}:")
340340
code_print(generated_test.generated_original_test_source, file_name=f"test_{i + 1}.py")
341341
if concolic_test_str:
342+
# no concolic tests in lsp mode
342343
logger.info(f"Generated test {count_tests}/{count_tests}:")
343344
code_print(concolic_test_str)
344345

@@ -1240,7 +1241,11 @@ def find_and_process_best_optimization(
12401241

12411242
if best_optimization:
12421243
logger.info("h2|tags|Best candidate 🚀")
1243-
code_print(best_optimization.candidate.source_code.flat)
1244+
code_print(
1245+
best_optimization.candidate.source_code.flat,
1246+
file_name="best_candidate.py",
1247+
function_name=self.function_to_optimize.function_name,
1248+
)
12441249
processed_benchmark_info = None
12451250
if self.args.benchmark:
12461251
processed_benchmark_info = process_benchmark_data(

0 commit comments

Comments
 (0)