Opennmt-py: 'OSError: Please check path of your src vocab file!' Despite valid path

Created on 29 Oct 2020  路  2Comments  路  Source: OpenNMT/OpenNMT-py

Hi,

I've previously been able to run onmt, but recently when I made some adjustments to my training data, I started getting OSError: Please check path of your src vocab file! errors when running onmt_build_vocab, despite the src vocab path being valid.

I decided to download the toy-ende example and am having the same issue. My yaml file looks like this:

# toy_en_de.yaml

# ## Where the samples will be written
save_data: /scratch/a/b/train-crk/toy-ende/run/
## Where the vocab(s) will be written
src_vocab: /scratch/a/b/train-crk/toy-ende/run/example.vocab.src
tgt_vocab: /scratch/a/b/train-crk/toy-ende/run/example.vocab.tgt
# # Prevent overwriting existing files in the folder
overwrite: False

# # Corpus opts:
data:
    corpus_1:
        path_src: /scratch/a/b/train-crk/toy-ende/src-train.txt
        path_tgt: /scratch/a/b/train-crk/toy-ende/tgt-train.txt
    valid:
        path_src: /scratch/a/b/train-crk/toy-ende/src-val.txt
        path_tgt: /scratch/a/b/train-crk/toy-ende/tgt-val.txt

The contents of toy-ende/ is populated with the following times:

run/ src-train.txt tgt-test.txt tgt-val.txt src-test.txt src-val.txt tgt-train.txt toy_en_de.yaml

The run/ directory is a valid but empty directory. I have full permissions in all folders.

Am I missing something? After running into these issues, I've pulled the most recent verbs and still have the issue. I don't recall having this issue previously.

Thank you.

Most helpful comment

The docs and the current 2.0.0rc1 are misaligned on this. I think we will put a rc2 out there quite soon.
In the mean time, you can install the current master (aligned with the docs) with the following command:
pip install --upgrade git+https://github.com/OpenNMT/OpenNMT-py

All 2 comments

The docs and the current 2.0.0rc1 are misaligned on this. I think we will put a rc2 out there quite soon.
In the mean time, you can install the current master (aligned with the docs) with the following command:
pip install --upgrade git+https://github.com/OpenNMT/OpenNMT-py

Fantastic! This has solved the problem!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

liangbright picture liangbright  路  4Comments

AyaNsar picture AyaNsar  路  4Comments

laubonghaudoi picture laubonghaudoi  路  4Comments

mbforbes picture mbforbes  路  6Comments

kakkartushar1 picture kakkartushar1  路  5Comments