Skip to content

Commit 19cd5c8

Browse files
committed
bugfix
1 parent e77da5c commit 19cd5c8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

codeflash/optimization/function_optimizer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,8 @@ def create_rank_dictionary_compact(int_array: list[int]) -> dict[int, int]:
619619
# Create a dictionary mapping the original index to its rank (its position in the sorted list)
620620
return {original_index: rank for rank, original_index in enumerate(sorted_indices)}
621621

622+
if not len(self.valid_optimizations):
623+
return None
622624
# need to figure out the best candidate here before we return best_optimization
623625
diff_lens_list = []
624626
runtimes_list = []

0 commit comments

Comments
 (0)