两个不正确的类型注解影响输入到 tokenizers.Tokenizer.encode() 的输入。
作者: JEHoctor创建于 2026年6月7日更新于 2026年9月25日
标签Stale
How this problem affects users
Say a user wants to:
- Tokenize pre-tokenized text.
- Pass in the pre-tokenized text as a tuple of strings.
- Use only code that passes Mypy type checking.
Then they can only do this because the typing issue above is masked by the second typing issue in
tokenizers/__init__.pyi. See below.
内容来源: huggingface/tokenizers