File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -522,7 +522,7 @@ def set_adapters(
522522 components_passed = set (adapter_weights .keys ())
523523 lora_components = set (self ._lora_loadable_modules )
524524
525- invalid_components = components_passed - lora_components
525+ invalid_components = sorted ( components_passed - lora_components )
526526 if invalid_components :
527527 raise ValueError (
528528 f"The following components in `adapter_weights` are not part of the pipeline: { invalid_components } . "
Original file line number Diff line number Diff line change @@ -1136,7 +1136,7 @@ def test_multiple_wrong_adapter_name_raises_error(self):
11361136 with self .assertRaises (ValueError ) as err_context :
11371137 pipe .set_adapters ("adapter-1" , adapter_weights = scale_with_wrong_components )
11381138
1139- wrong_components = set (scale_with_wrong_components .keys ())
1139+ wrong_components = sorted ( set (scale_with_wrong_components .keys () ))
11401140 msg = f"The following components in `adapter_weights` are not part of the pipeline: { wrong_components } "
11411141 self .assertTrue (msg in str (err_context .exception ))
11421142
You can’t perform that action at this time.
0 commit comments