vocab_file找不到
pythonla opened this issue · comments
pythonla commented
File "C:\Users\1\miniconda3\lib\site-packages\transformers\models\gpt2\tokenization_gpt2.py", line 179, in init
with open(vocab_file, encoding="utf-8") as vocab_handle:
TypeError: expected str, bytes or os.PathLike object, not NoneType
您好,我使用3.4.0的transformers加载tokenizer的时候一直报错,然后看了一下transformers的源码,BartTokenizer要加载json格式的词表,但我从huggingface下载的bart 预训练模型中词表是TXT文件,是transformers版本问题吗? 谢谢
yhcc commented
我不太清楚是啥问题,不过为啥不直接BartTokenizer.from_pretrained让它自己下载vocab文件咧。
pythonla commented
这是来自QQ邮箱的假期自动回复邮件。你发给我的信件已经收到。谢谢!