Skip to content

Commit

Permalink
[Fix] fix duplicate error in partitioner (#1552)
Browse files Browse the repository at this point in the history
* fix pip version

* fix pip version

* fix duplicate error in paritioner

* fix duplicate error in paritioner
  • Loading branch information
bittersweet1999 authored Sep 23, 2024
1 parent 3356671 commit a2e9bc0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions opencompass/partitioners/sub_naive.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ def remove_duplicate_pairs(model_combinations):
combo_dict = {}
for i, combo in enumerate(model_combinations):
sorted_names = tuple(sorted((combo[0]['abbr'], combo[1]['abbr'])))
if sorted_names[0] == sorted_names[1]:
continue
if sorted_names not in combo_dict:
combo_dict[sorted_names] = i
new_model_combinations = [
Expand Down

0 comments on commit a2e9bc0

Please sign in to comment.