Skip to content

TypeError: not a string #440

Open
Open
@neobie

Description

tokenizer = AutoTokenizer.from_pretrained("IDEA-CCNL/Randeng-Pegasus-238M-Summary-Chinese")

File "/opt/homebrew/lib/python3.8/site-packages/transformers/models/auto/tokenization_auto.py", line 786, in from_pretrained
return tokenizer_class_fast.from_pretrained(pretrained_model_name_or_path, *inputs, **kwargs)
File "/opt/homebrew/lib/python3.8/site-packages/transformers/tokenization_utils_base.py", line 2024, in from_pretrained
return cls._from_pretrained(
File "/opt/homebrew/lib/python3.8/site-packages/transformers/tokenization_utils_base.py", line 2056, in _from_pretrained
slow_tokenizer = (cls.slow_tokenizer_class)._from_pretrained(
File "/opt/homebrew/lib/python3.8/site-packages/transformers/tokenization_utils_base.py", line 2256, in _from_pretrained
tokenizer = cls(*init_inputs, **init_kwargs)
File "/opt/homebrew/lib/python3.8/site-packages/transformers/models/pegasus/tokenization_pegasus.py", line 149, in init
self.sp_model.Load(vocab_file)
File "/opt/homebrew/lib/python3.8/site-packages/sentencepiece/init.py", line 905, in Load
return self.LoadFromFile(model_file)
File "/opt/homebrew/lib/python3.8/site-packages/sentencepiece/init.py", line 310, in LoadFromFile
return _sentencepiece.SentencePieceProcessor_LoadFromFile(self, arg)
TypeError: not a string

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions