Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PegasusTokenizer returning None #11789

Closed
1 of 4 tasks
akashe opened this issue May 20, 2021 · 9 comments
Closed
1 of 4 tasks

PegasusTokenizer returning None #11789

akashe opened this issue May 20, 2021 · 9 comments

Comments

@akashe
Copy link
Contributor

akashe commented May 20, 2021

Environment info

  • transformers version:
  • Platform: Ubuntu 20.04
  • Python version: Python 3.7.10
  • PyTorch version (GPU?): 1.8.1+cu101
  • Tensorflow version (GPU?):
  • Using GPU in script?: Problem in both CPU and GPU
  • Using distributed or parallel set-up in script?: No

Who can help @patrickvonplaten @LysandreJik

Information

Model I am using (Bert, XLNet ...): Pegasus

The problem arises when using:

  • the official example scripts: (give details below)
  • my own modified scripts: (give details below)

The tasks I am working on is:

  • an official GLUE/SQUaD task: (give the name)
  • my own task or dataset: (give details below)

To reproduce

Steps to reproduce the behavior:

  1. Go to https://huggingface.co/transformers/model_doc/pegasus.html#pegasusforconditionalgeneration
  2. Run the summarization example in the section
  3. PegasusTokenizer.from_pretrained('google/pegasus-xsum') returns None. PegasusTokenizer also returns None for 'google/pegasus-large'

Expected behavior

Should return a non None value.

@patrickvonplaten
Copy link
Contributor

Hey @akashe,

Think this error is analogs to this one: #8864.

Installing sentencepiece should solve the problem :-)

#8864

@github-actions
Copy link

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 github-actions bot closed this as completed Jul 5, 2021
@nikhilmenon06
Copy link

Hey @akashe,

Think this error is analogs to this one: #8864.

Installing sentencepiece should solve the problem :-)

#8864

Still does not seem to work, even after installing sentencepiece

@crackedpotato007
Copy link

Same here ;(

@patrickvonplaten
Copy link
Contributor

Could you please update to the newest transformers version and check again? I cannot reproduce the error sadly

@akashe
Copy link
Contributor Author

akashe commented Jan 18, 2022

Hi @patrickvonplaten, checked with the newest transformers. Tokenizer is not returning None.

@smahm094
Copy link

smahm094 commented Jun 2, 2022

@akashe did you solve the problem later? I am having the same issue.

@akashe
Copy link
Contributor Author

akashe commented Jun 11, 2022

Update to the newest version. It worked after that.

@Ahmedniz1
Copy link

I got the same issue first, of getting Nonetype. To solve this, just install sentencepiece, and make sure to restart runtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants