Skip to content

Commit fb4be50

Browse files
authored
[bugfix] fix dataset hash (#7916)
1 parent a8cc234 commit fb4be50

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

swift/model/model_meta.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,8 @@ def __post_init__(self):
8787
self.loader = ModelLoader
8888
if not isinstance(self.model_groups, (list, tuple)):
8989
self.model_groups = [self.model_groups]
90-
self.candidate_templates = set([self.template])
91-
for model_group in self.model_groups:
92-
self.candidate_templates.add(model_group.template)
93-
self.candidate_templates.discard(None)
94-
self.candidate_templates = list(self.candidate_templates)
95-
90+
self.candidate_templates = list(
91+
dict.fromkeys(t for t in [self.template] + [mg.template for mg in self.model_groups] if t is not None))
9692
if self.model_type in MLLMModelType.__dict__:
9793
self.is_multimodal = True
9894
if self.model_type in RMModelType.__dict__:

0 commit comments

Comments
 (0)