realworldnlp icon indicating copy to clipboard operation
realworldnlp copied to clipboard

Module Not Found Error for Machine Translation

Open asvskartheek opened this issue 4 years ago • 1 comments

ModuleNotFoundError: No module named 'allennlp.data.dataset_readers.seq2seq' I'm trying to run the code examples/mt/mt.py with allennlp==1.0.0 and got this error, no code changes direct clone of the repo and tried to run it.

asvskartheek avatar Sep 05 '20 16:09 asvskartheek

I noticed this as well with some of the other examples. With the bump to 1.0.0, AllenNLP moved around a lot of packages and code that really drives these examples.

I have a draft fix that seems to work (but I haven't finished it end-to-end).

https://github.com/mhagiwara/realworldnlp/compare/master...mathcass:mt/fix?expand=1

When I get a spare moment, I can try it on a GPU to ensure it completes. The fixed version re-writes the initialization and training process in the same form as the latest version of the AllenNLP guide specifies.

mathcass avatar Sep 07 '20 22:09 mathcass