Skip to content

Commit 86cbcae

Browse files
committed
minor changes
1 parent 777ad9e commit 86cbcae

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

codeflash/api/aiservice.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,6 @@ def optimize_python_code_refinement(self, request: list[AIServiceRefinerRequest]
278278
console.rule()
279279
return []
280280

281-
def log_results( # noqa: D417
282281
def get_new_explanation(
283282
self,
284283
source_code: str,

codeflash/optimization/function_optimizer.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,19 @@ def determine_best_candidate(
574574
if not len(self.valid_optimizations):
575575
return None
576576
# need to figure out the best candidate here before we return best_optimization
577+
# new_explanation = self.aiservice_client.get_new_explanation(
578+
# source_code=code_context.read_writable_code,
579+
# dependency_code=code_context.read_only_context_code,
580+
# trace_id=self.function_trace_id,
581+
# num_candidates=1,
582+
# experiment_metadata=None,
583+
# existing_explanation=best_optimization.candidate.explanation,
584+
# )
585+
#
586+
# best_optimization.candidate = replace(
587+
# best_optimization.candidate,
588+
# explanation=new_explanation if new_explanation != "" else best_optimization.candidate.explanation,
589+
# )
577590
diff_lens_list = [] # character level diff
578591
runtimes_list = []
579592
for valid_opt in self.valid_optimizations:

0 commit comments

Comments
 (0)