OpenNMT Forum

Can't find the file 'demo-model_acc_x_ppl_x_e13.pt'

Hi there,
I am trying to replicate OpenNMT-py ‘image2text’ model https://github.com/OpenNMT/OpenNMT-py/blob/legacy/docs/source/im2text.md
using v1.0.0.rc1.
I have trained the model using the sample data and 100K provided by you guys, and also trained a separate model using my own data.
The problem is that after training I am not able to locate ‘demo-model_acc_x_ppl_x_e13.pt’ and hence I am not able to test the model. May I request you to please help me with this. Any suggestions would be appreciated.
Thank you in advance!

Traceback (most recent call last):

File “/opt/automates_venv/bin/onmt_translate”, line 33, in
sys.exit(load_entry_point(‘OpenNMT-py==1.2.0’, ‘console_scripts’, ‘onmt_translate’)())
File “/opt/automates_venv/lib/python3.8/site-packages/OpenNMT_py-1.2.0-py3.8.egg/onmt/bin/translate.py”, line 48, in main
translate(opt)
File “/opt/automates_venv/lib/python3.8/site-packages/OpenNMT_py-1.2.0-py3.8.egg/onmt/bin/translate.py”, line 18, in translate
translator = build_translator(opt, logger=logger, report_score=True)
File “/opt/automates_venv/lib/python3.8/site-packages/OpenNMT_py-1.2.0-py3.8.egg/onmt/translate/translator.py”, line 28, in build_translator
fields, model, model_opt = load_test_model(opt)
File “/opt/automates_venv/lib/python3.8/site-packages/OpenNMT_py-1.2.0-py3.8.egg/onmt/model_builder.py”, line 94, in load_test_model
checkpoint = torch.load(model_path,
File “/opt/automates_venv/lib/python3.8/site-packages/torch-1.8.1-py3.8-linux-x86_64.egg/torch/serialization.py”, line 579, in load
with _open_file_like(f, ‘rb’) as opened_file:
File “/opt/automates_venv/lib/python3.8/site-packages/torch-1.8.1-py3.8-linux-x86_64.egg/torch/serialization.py”, line 230, in _open_file_like
return _open_file(name_or_buffer, mode)
File “/opt/automates_venv/lib/python3.8/site-packages/torch-1.8.1-py3.8-linux-x86_64.egg/torch/serialization.py”, line 211, in init
super(_open_file, self).init(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: ‘demo-model_acc_x_ppl_x_e13.pt’

The checkpoint naming scheme changed but the doc was never updated apparently. Look for checkpoint in the form of demo-model_step_XXX.pt instead.

Thanks! I am using the last checkpoint for the testing – demo-model_step_100000.pt
It threw an error which is not related to this post. Hence I am starting a new post for that.
Thank you for helping me out with this error.