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 19cd5c8 commit 5aab3b8Copy full SHA for 5aab3b8
codeflash/optimization/function_optimizer.py
@@ -556,13 +556,15 @@ def determine_best_candidate(
556
ai_service_client=ai_service_client,
557
executor=executor,
558
)
559
+ # filter out empty strings of code
560
more_opt_candidates = [
561
OptimizedCandidate(
562
source_code=refinement_diffs[i],
563
explanation=self.valid_optimizations[i].candidate.explanation,
564
optimization_id=self.valid_optimizations[i].candidate.optimization_id,
565
566
for i in range(len(refinement_diffs))
567
+ if refinement_diffs[i] != ""
568
]
569
# we no longer need to apply diffs since we are generating the entire code again
570
candidates.extend(more_opt_candidates)
0 commit comments