SIGN IN SIGN UP

🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training.

158577 0 0 Python

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 <[email protected]>
M
Maxim Kurkin committed
02063e683595e4a3e7f4e5be2fee17cab129e4bb
Parent: 2da00a3
Committed by GitHub <[email protected]> on 3/30/2026, 11:26:37 AM