[Fix] fix duplicate error in partitioner (#1552)

* fix pip version

* fix pip version

* fix duplicate error in paritioner

* fix duplicate error in paritioner
This commit is contained in:
bittersweet1999 2024-09-23 19:45:21 +08:00 committed by GitHub
parent 335667183a
commit a2e9bc0c41
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 = [