System Info
transformers 5.4.0
mypy 1.19.1
python 3.10
Who can help?
No response
Information
Tasks
Reproduction
# transformers_typing.py
from transformers import LlamaConfig
llama_config = LlamaConfig(vocab_size=32000)
Run mypy type checker
mypy transformers_typing.py
Output:
transformers_typing.py:3: error: Unexpected keyword argument "vocab_size" for "LlamaConfig" [call-arg]
Found 1 error in 1 file (checked 1 source file)
Note: It's not just vocab_size that's missing. As far as I can tell, this fails with all config attributes.
Expected behavior
Type checking passes. Note: this is the case for transformers<5.4.0.
System Info
transformers
5.4.0mypy
1.19.1python
3.10Who can help?
No response
Information
Tasks
examplesfolder (such as GLUE/SQuAD, ...)Reproduction
Run mypy type checker
Output:
Note: It's not just
vocab_sizethat's missing. As far as I can tell, this fails with all config attributes.Expected behavior
Type checking passes. Note: this is the case for
transformers<5.4.0.