Skip to content

Commit 83814be

Browse files
author
Codeflash Bot
committed
ready to run experiments
1 parent fe33c82 commit 83814be

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

codeflash/optimization/function_optimizer.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ def __init__(
306306
)
307307
self.optimization_review = ""
308308
# SQLite database setup for logging
309-
self.code_repair_log_db = Path(__file__).parent / "code_repair_log_cf.db"
309+
self.code_repair_log_db = Path(__file__).parent / "code_repair_logs_cf.db"
310310

311311
def can_be_optimized(self) -> Result[tuple[bool, CodeOptimizationContext, dict[Path, str]], str]:
312312
should_run_experiment = self.experiment_id is not None
@@ -450,13 +450,14 @@ def optimize_function(self) -> Result[BestOptimization, str]:
450450
conn = sqlite3.connect(self.code_repair_log_db)
451451
cursor = conn.cursor()
452452
cursor.execute("""
453-
CREATE TABLE IF NOT EXISTS code_repair_logs (
453+
CREATE TABLE IF NOT EXISTS code_repair_logs_cf (
454454
optimization_id TEXT PRIMARY KEY,
455455
trace_id TEXT,
456456
passed TEXT,
457457
faster TEXT,
458458
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
459459
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
460+
)
460461
""")
461462
conn.commit()
462463
conn.close()
@@ -1980,7 +1981,7 @@ def run_optimized_candidate(
19801981
try:
19811982
diff_per_test_fn[diff.test_src_code] = (
19821983
diff_per_test_fn.setdefault(diff.test_src_code, "")
1983-
+ f"Expected Value: {diff.original_value!s}\nActual Value: {diff.candidate_value!s}\nError String:{diff.pytest_error}\n"
1984+
+ f"Expected Value: {diff.original_value!s}\nActual Value: {diff.candidate_value!s}\nError String:{diff.candidate_pytest_error}\n"
19841985
)
19851986

19861987
except Exception as e:

0 commit comments

Comments
 (0)