wasiahmad / PLBART

Official code of our work, Unified Pre-training for Program Understanding and Generation [NAACL 2021].
https://arxiv.org/abs/2103.06333
MIT License
186 stars 35 forks source link

AttributeError: module 'sentencepiece' has no attribute 'SentencePieceProcessor' #7

Closed tmarrakchi closed 3 years ago

tmarrakchi commented 3 years ago

Firstly, I would like to thank you for your release and documentation. I am fine-tuning the text-to-code model and when I run the "scripts / text_to_code / prepare.sh" file I have the following error in the file "scripts/text_to_code/encode.py", line 30" :

AttributeError: module 'sentencepiece' has no attribute 'SentencePieceProcessor'

Any idea please ?

wasiahmad commented 3 years ago

I am using

Name: sentencepiece
Version: 0.1.90
Summary: SentencePiece python wrapper
Home-page: https://github.com/google/sentencepiece
Author: Taku Kudo
Author-email: taku@google.com
License: Apache

Please check the version of the sentencepiece.

tmarrakchi commented 3 years ago

Thanks Ahmed it's working. I used the same version :)

tnv-9217 commented 2 years ago

Firstly, I would like to thank you for your release and documentation. I am fine-tuning the text-to-code model and when I run the "scripts / text_to_code / prepare.sh" file I have the following error in the file "scripts/text_to_code/encode.py", line 30" :

AttributeError: module 'sentencepiece' has no attribute 'SentencePieceProcessor'

Any idea please ?

did you find any answer ? I m facing the same error bro AttributeError: module 'sentencepiece' has no attribute 'SentencePieceProcessor'

wasiahmad commented 2 years ago

Check your sentencepiece version.

tnv-9217 commented 2 years ago

the version which you specified, I tried it and its giving this error ( and I m trying this on jupyter notebook on MacBook Pro m1 chip )

ERROR: Could not find a version that satisfies the requirement sentencepiece==0.1.90 (from versions: 0.0.0, 0.0.2, 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.0.7, 0.0.9, 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.83, 0.1.86, 0.1.91, 0.1.92, 0.1.94, 0.1.95, 0.1.96) ERROR: No matching distribution found for sentencepiece==0.1.90