We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3cbd6b7 commit a10600cCopy full SHA for a10600c
codeflash/optimization/function_optimizer.py
@@ -2,6 +2,7 @@
2
3
import ast
4
import concurrent.futures
5
+import dataclasses
6
import os
7
import shutil
8
import subprocess
@@ -453,7 +454,7 @@ def determine_best_candidate(
453
454
if temp_code_file_path and temp_code_file_path.exists():
455
temp_code_file_path.unlink(missing_ok=True)
456
- candidate.source_code = formatted_candidate_code
457
+ candidate = dataclasses.replace(candidate, source_code=formatted_candidate_code)
458
459
get_run_tmp_file(Path(f"test_return_values_{candidate_index}.bin")).unlink(missing_ok=True)
460
get_run_tmp_file(Path(f"test_return_values_{candidate_index}.sqlite")).unlink(missing_ok=True)
0 commit comments