masakhane-io / masakhane-mt

Machine Translation for Africa
MIT License
278 stars 206 forks source link

Masakhane Reverse Machine Learning translation notebook Training Issue #164

Open RuanJohn opened 3 years ago

RuanJohn commented 3 years ago

I am trying to run the the starter revere training notebook and run into the following issue:

Everything seems to be working just fine, right up to when I want to train the model (the fourth cell from the bottom of the notebook), when I get the following error:

Traceback (most recent call last): File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/usr/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/content/joeynmt/joeynmt/__main__.py", line 3, in <module> from joeynmt.training import train File "/content/joeynmt/joeynmt/training.py", line 22, in <module> from torchtext.legacy.data import Dataset File "/usr/local/lib/python3.7/dist-packages/torchtext/__init__.py", line 5, in <module> from . import vocab File "/usr/local/lib/python3.7/dist-packages/torchtext/vocab.py", line 13, in <module> from torchtext._torchtext import ( ImportError: /usr/local/lib/python3.7/dist-packages/torchtext/_torchtext.so: undefined symbol: _ZN2at6detail10noopDeleteEPv

bricksdont commented 3 years ago

(Copying over my answer from Masakhane slack)

I think that the reason is that this notebook explicitly installs torch==1.8.0+cu101 . Joey itself now requires >torch-1.9.0 and Colab has torch-1.9.0+cu102installed by default.

Temporary fixes:

a) If you already installed another version in your running Colab:

! pip install torch==1.9.0+cu102 -f https://download.pytorch.org/whl/torch_stable.html

b) If you boot up a new Colab: do not install version 1.8.0 of torch after installing joeynmt

bricksdont commented 3 years ago

Permanent fix: in the starter notebook the line that installs 1.8.0 explicitly should be removed.

RuanJohn commented 3 years ago

Thank you @bricksdont