icml-2020-nlp / semsim

40 stars 9 forks source link

Inference script: TypeError: expected str, bytes or os.PathLike object, not NoneType #1

Closed ranjeetds closed 4 years ago

ranjeetds commented 4 years ago

While inferencing the model getting this above error at data_name_or_path='cnn_dm-bin'

I have not tuned BART model. I downloaded semsim pretrained model and trying to use it for inference on test data set.

icml-2020-nlp commented 4 years ago

Hi, Thank you for your interests on our work. You need to generated cnn_dm-bin by following 2) BPE preprocess and 3) Binarize dataset just as when you finetune the model. Sorry for the confusion and I will update the README Thanks!

ranjeetds commented 4 years ago

Thank you very much for the prompt response. Will follow the steps you have mentioned.

ranjeetds commented 4 years ago

@icml-2020-nlp could you please mention that step 2) BPE preprocess commands are bash commands so that they needs to be run through terminal itself (Even though it is apperent it creates confusion at first)

icml-2020-nlp commented 4 years ago

@ranjeetds Thank you!

icml-2020-nlp commented 4 years ago

Hi @ranjeetds , Have you installed fairseq == 0.8.0 ?

pip install fairseq==0.8.0

(Edited. Sorry without spaces)

ranjeetds commented 4 years ago

@icml-2020-nlp no.

icml-2020-nlp commented 4 years ago

@ranjeetds As we mentioned in here, you need to install

pip install fairseq==0.8.0

AND

cd fairseq-semsim
pip install --editable .

Would you please proceed with the pre-processing steps after you install fairseq == 0.8.0 and let us know the results?

I am checking the code once again and also thinking of making some requirement.txt.... Thanks for letting us know!

icml-2020-nlp commented 4 years ago

Fyi you need python3-dev to install fairseq

sudo apt-get install python3-dev (match your python version)
ranjeetds commented 4 years ago

Hi @icml-2020-nlp, Thank you very much for your valuable response. Got everything working fine. Thank you very much.