Fix TypeError in save_pretrained error handling (fixes #38422) (#38449)

This commit is contained in:
Rahul 2025-05-29 19:28:16 +05:30 committed by GitHub
parent ad9dd3d17b
commit 8e5cefcb1e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3746,7 +3746,7 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, PushToHubMixin, PeftAdapterMi
error_names.append(unknown)
if shared_names:
error_names.append(set(shared_names))
error_names.extend(shared_names)
if len(error_names) > 0:
raise RuntimeError(