I tried to follow the tutorial, but this error keeps popping up, I thought I found the solution for it, but it turns out I didn't:
when running preprocess.py:
from onmt.utils.logging import init_logger, logger
ModuleNotFoundError: No module named 'onmt'
I've had this when following the pretrained embeddings tutorial where it says to run:
./tools/embeddings_to_torch.py -emb_file "glove_dir/glove.6B.100d.txt" \
-dict_file "data/data.vocab.pt" \
-output_file "data/embeddings"
Move ./tools/embeddings_to_torch.py to ./embeddings_to_torch.py (i.e. the top-level directory) and it works.
you don't have to do this if:
1) you install with setup.py
or
2) you export PYTHONPATH to the current dir of the repo
Thank you both, there was a problem with the path, because i use Anaconda it was set to the wrong directory. (...anaconda instead of ...Anaconda3)
@jbecke
Try
python -m tools.embeddings_to_torch
instead of
./tools/embeddings_to_torch.py
Most helpful comment
you don't have to do this if:
1) you install with setup.py
or
2) you export PYTHONPATH to the current dir of the repo