Can't load config for 'google/pegasus-pubmed'

Hello!

Can anyone help me to resolve this problem?

Thank you

Traceback (most recent call last):
File "/home/venv/lib/python3.6/site 
packages/transformers/configuration_utils.py", line 359, in 
get_config_dictraise EnvironmentError
OSError


During handling of the above exception, another exception 
occurred:

Traceback (most recent call last):
File "/path/pegasus.py", line 86, in <module>
tokenizer = AutoTokenizer.from_pretrained(model_name)
File "/home/venv/lib/python3.6/site- 
packages/transformers/tokenization_auto.py", 
line 216, in from_pretrained 
config=AutoConfig.from_pretrained
(pretrained_model_name_or_path, **kwargs)
File "/home/venv/lib/python3.6/site- 
packages/transformers/configuration_auto.py", 
line 310, in from_pretrained
config_dict, _ = 
PretrainedConfig.get_config_dict
(pretrained_model_name_or_path, **kwargs)
File "/home/venv/lib/python3.6/site- 
packages/transformers/configuration_utils.py", 
line 368, in get_config_dict
raise EnvironmentError(msg)
OSError: Can't load config for 'google/pegasus- 
pubmed'. Make sure that:

- 'google/pegasus-pubmed' is a correct model 
identifier listed on 
'https://huggingface.co/models'

- or 'google/pegasus-pubmed' is the correct path 
to a directory containing a config.json file

Environment info is as follows:
transformers: 3.0.2
tensorflow and tensorflow-gpu: 1.15.2
CUDA: V10.0.130
python: 3.6.10

I think Pegasus was only introduced in v3.1.0 so you’ll need to update your transformers library.

pip install -U transformers
1 Like

Hello!

Thank you so much! It works. However, also it’s necessary to update at least the Tensorflow 2.2 version.

Reference:
https://github.com/huggingface/transformers/issues/7333