bert-nmt / bert-nmt

Other
360 stars 103 forks source link

NameError: name 'subword_nmt' is not defined while running prepare-iwslt14.sh #58

Open ishanisri opened 3 years ago

ishanisri commented 3 years ago

The following error comes up when trying to run the repo locally at the command bash prepare-iwslt14.sh. This did not come up in the colab notebook and had instead just shown the Depreciation warning. Any help will be appreciated in fixing this. Thanks!

creating train, valid, test...
learn_bpe.py on iwslt14.tokenized.de-en/tmp/train.en-de...
Traceback (most recent call last):
  File "subword-nmt/learn_bpe.py", line 1, in <module>
    subword_nmt/learn_bpe.py
NameError: name 'subword_nmt' is not defined
apply_bpe.py to train.de...
Traceback (most recent call last):
  File "subword-nmt/apply_bpe.py", line 1, in <module>
    subword_nmt/apply_bpe.py
NameError: name 'subword_nmt' is not defined
apply_bpe.py to valid.de...
Traceback (most recent call last):
  File "subword-nmt/apply_bpe.py", line 1, in <module>
    subword_nmt/apply_bpe.py
NameError: name 'subword_nmt' is not defined
apply_bpe.py to test.de...
Traceback (most recent call last):
  File "subword-nmt/apply_bpe.py", line 1, in <module>
    subword_nmt/apply_bpe.py
NameError: name 'subword_nmt' is not defined
apply_bpe.py to train.en...
Traceback (most recent call last):
  File "subword-nmt/apply_bpe.py", line 1, in <module>
    subword_nmt/apply_bpe.py
NameError: name 'subword_nmt' is not defined
apply_bpe.py to valid.en...
Traceback (most recent call last):
  File "subword-nmt/apply_bpe.py", line 1, in <module>
    subword_nmt/apply_bpe.py
NameError: name 'subword_nmt' is not defined
apply_bpe.py to test.en...
Traceback (most recent call last):
  File "subword-nmt/apply_bpe.py", line 1, in <module>
    subword_nmt/apply_bpe.py
NameError: name 'subword_nmt' is not defined
Ashutosh553 commented 3 years ago

You Can refer to this file:- https://github.com/rsennrich/subword-nmt/blob/master/subword_nmt/apply_bpe.py, then you fix your NameError. And Depreciation warning has come due to the file you refer to that does not contain the existing feature.