Commit 02063e6
Fix TypeError in rope validation when ignore_keys is a list (#45069)
`_check_received_keys` performs `received_keys -= ignore_keys` where
`received_keys` is a `set`. When model configs are loaded from JSON
(e.g. via huggingface_hub dataclass validation), sets get deserialized
as lists since JSON has no set type, causing:
TypeError: unsupported operand type(s) for -=: 'set' and 'list'
Wrapping with `set()` handles both cases (no-op for sets, converts lists).
Fixes #45068
Co-authored-by: IrinaArmstrong <a.irene.a@mail.ru>1 parent 2da00a3 commit 02063e6
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
916 | 916 | | |
917 | 917 | | |
918 | 918 | | |
919 | | - | |
| 919 | + | |
920 | 920 | | |
921 | 921 | | |
922 | 922 | | |
| |||
0 commit comments