transformers icon indicating copy to clipboard operation
transformers copied to clipboard

Pure Python `PreTrainedTokenizer` is Broken

Open daskol opened this issue 1 year ago • 1 comments

System Info

transformers v4.40.2 tokenizers v0.19.1

Who can help?

@ArthurZucker

Information

  • [ ] The official example scripts
  • [ ] My own modified scripts

Tasks

  • [ ] An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • [ ] My own task or dataset (give details below)

Reproduction

>>> from transformers import GPT2Tokenizer
>>> tokenizer = GPT2Tokenizer.from_pretrained('gpt2')
...
TypeError: unhashable type: 'AddedToken'

Expected behavior

No exception is raised.

daskol avatar May 07 '24 14:05 daskol

Sorry but I cannot reproduce, could you make sure you are running this on 4.40?

ArthurZucker avatar May 08 '24 15:05 ArthurZucker

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

github-actions[bot] avatar Jun 07 '24 08:06 github-actions[bot]