transformers
02063e68 - Fix TypeError in rope validation when ignore_keys is a list (#45069)

Commit
9 hours ago
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>
Author
Parents
Loading