ValueError: invalid literal for int() with base 10: '-3.21588'

Sorry, I am kind of a total beginner at this stuff, so please bear with me.

I’m trying to train an NMT model FR-EN but I keep getting this error.

Code:

!onmt_train -config config.yaml

Error:

File “/usr/local/lib/python3.10/dist-packages/onmt/inputters/inputter.py”, line 282, in _load_vocab
counters[name][token] = int(count)
ValueError: invalid literal for int() with base 10: ‘-3.21588’

I looked through the files and the -3.21588 comes from the source.model file. I understand that the error is basically because -3.21588 is not an integer, and what is there should be an integer. Looking through the files, I assume what it should be reading is the… run.vocab.src? How do I get it to read that?

Note: As I said before, I am a beginner. I used a tutorial on NMT and tried to just replace the sample corpora with my own. Perhaps I didn’t set the config right?

The issue is caused by passing a string to int() instead of a float:

int('-3.21588')
# ValueError: invalid literal for int() with base 10: '-3.21588'

int(-3.21588)
# -3