Skip to content

Commit 87822c1

Browse files
committed
should work now
1 parent 766c319 commit 87822c1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

codeflash/optimization/function_optimizer.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,8 +403,11 @@ def determine_best_candidate(
403403
f"Added results from line profiler to candidates, total candidates now: {original_len}"
404404
)
405405
future_line_profile_results = None
406+
try:
407+
candidate = candidates.popleft()
408+
except IndexError as e:
409+
continue
406410
candidate_index += 1
407-
candidate = candidates.popleft()
408411
get_run_tmp_file(Path(f"test_return_values_{candidate_index}.bin")).unlink(missing_ok=True)
409412
get_run_tmp_file(Path(f"test_return_values_{candidate_index}.sqlite")).unlink(missing_ok=True)
410413
logger.info(f"Optimization candidate {candidate_index}/{original_len}:")

0 commit comments

Comments
 (0)