Skip to content

Commit 3c05f97

Browse files
committed
Update function_optimizer.py
1 parent 14353d4 commit 3c05f97

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

codeflash/optimization/function_optimizer.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,10 +1393,9 @@ def establish_original_code_baseline(
13931393
code_context=code_context,
13941394
)
13951395
finally:
1396-
if not self.function_to_optimize.is_async:
1397-
self.write_code_and_helpers(
1398-
self.function_to_optimize_source_code, original_helper_code, self.function_to_optimize.file_path
1399-
)
1396+
self.write_code_and_helpers(
1397+
self.function_to_optimize_source_code, original_helper_code, self.function_to_optimize.file_path
1398+
)
14001399
if not behavioral_results:
14011400
logger.warning(
14021401
f"Couldn't run any tests for original function {self.function_to_optimize.function_name}. SKIPPING OPTIMIZING THIS FUNCTION."

0 commit comments

Comments
 (0)