Skip to content

Commit 5823492

Browse files
authored
Merge pull request #615 from codeflash-ai/ast-deduplication
AST deduplication
2 parents 45b42a4 + 86e1a72 commit 5823492

File tree

3 files changed

+303
-262
lines changed

3 files changed

+303
-262
lines changed

codeflash/api/aiservice.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ def log_results( # noqa: D417
360360
is_correct: dict[str, bool] | None,
361361
optimized_line_profiler_results: dict[str, str] | None,
362362
metadata: dict[str, Any] | None,
363+
optimizations_post: dict[str, str] | None = None,
363364
) -> None:
364365
"""Log features to the database.
365366
@@ -372,6 +373,7 @@ def log_results( # noqa: D417
372373
- is_correct (Optional[Dict[str, bool]]): Whether the optimized code is correct.
373374
- optimized_line_profiler_results: line_profiler results for every candidate mapped to their optimization_id
374375
- metadata: contains the best optimization id
376+
- optimizations_post - dict mapping opt id to code str after postprocessing
375377
376378
"""
377379
payload = {
@@ -383,6 +385,7 @@ def log_results( # noqa: D417
383385
"codeflash_version": codeflash_version,
384386
"optimized_line_profiler_results": optimized_line_profiler_results,
385387
"metadata": metadata,
388+
"optimizations_post": optimizations_post,
386389
}
387390
try:
388391
self.make_ai_service_request("/log_features", payload=payload, timeout=5)

0 commit comments

Comments
 (0)