Internal type error when using trained model

Hi,

I’ve tried getting started and small experiments using opennmt with success.

But, on my real problem, I’ve some issues. For information, my data set has 5.000.000 lines which produce a 160mb model to be trained.

After 7 days training, when I try to use the trained model I get this error with or without GPU:

root@9f0faa133529:~/torch/opennmt# th translate.lua -model ../data/os-model-14043_epoch13_15.07_10478.t7  -src data/src-test.txt  -output pred.txt -gpuid 1
[07/23/17 14:04:15 INFO] Using GPU(s): 1	
[07/23/17 14:04:15 INFO] Loading '../data/os-model-14043_epoch13_15.07_10478.t7'...	
[07/23/17 14:04:17 INFO] Model seq2seq trained on bitext	
/root/torch/install/bin/luajit: /root/torch/install/share/lua/5.1/nn/MapTable.lua:15: bad argument #1 to 'unpack' (table expected, got boolean)
stack traceback:
	[C]: in function 'unpack'
	/root/torch/install/share/lua/5.1/nn/MapTable.lua:15: in function '_extend'
	/root/torch/install/share/lua/5.1/nn/MapTable.lua:36: in function 'updateOutput'
	./onmt/modules/Network.lua:11: in function 'forward'
	./onmt/translate/Translator.lua:271: in function 'translateBatch'
	./onmt/translate/Translator.lua:396: in function 'translate'
	translate.lua:110: in function 'main'
	translate.lua:196: in main chunk
	[C]: in function 'dofile'
	/root/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
	[C]: at 0x00406670

I dont know how to fix that…

Please, can you help me?

Thanks!

Hi,

You should update your Torch installation.

@guillaumekln thank you for the answer!

But, after the update, I got this output:

root@7afe740a3e28:~/torch/opennmt# th translate.lua -model ../data/os-model-29221_epoch13_15.07_release.t7 -src data/src-test.txt -output pred.txt
[07/26/17 16:18:46 INFO] Loading '../data/os-model-29221_epoch13_15.07_release.t7'...	
/root/torch/install/bin/luajit: /root/torch/install/share/lua/5.1/torch/File.lua:375: unknown object
stack traceback:
	[C]: in function 'error'
	/root/torch/install/share/lua/5.1/torch/File.lua:375: in function 'readObject'
	/root/torch/install/share/lua/5.1/torch/File.lua:368: in function 'readObject'
	/root/torch/install/share/lua/5.1/nn/Module.lua:192: in function 'read'
	/root/torch/install/share/lua/5.1/torch/File.lua:351: in function 'readObject'
	/root/torch/install/share/lua/5.1/torch/File.lua:369: in function 'readObject'
	/root/torch/install/share/lua/5.1/torch/File.lua:369: in function 'readObject'
	/root/torch/install/share/lua/5.1/torch/File.lua:353: in function 'readObject'
	/root/torch/install/share/lua/5.1/torch/File.lua:368: in function 'readObject'
	/root/torch/install/share/lua/5.1/torch/File.lua:369: in function 'readObject'
	/root/torch/install/share/lua/5.1/torch/File.lua:369: in function 'readObject'
	...
	/root/torch/install/share/lua/5.1/torch/File.lua:369: in function 'readObject'
	/root/torch/install/share/lua/5.1/torch/File.lua:369: in function 'readObject'
	/root/torch/install/share/lua/5.1/torch/File.lua:409: in function 'load'
	./onmt/translate/Translator.lua:110: in function '__init'
	/root/torch/install/share/lua/5.1/torch/init.lua:91: in function 'new'
	translate.lua:53: in function 'main'
	translate.lua:196: in main chunk
	[C]: in function 'dofile'
	/root/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
	[C]: at 0x00406670

I’m using an x86_64 linux on my training machine and production machine (RedHat Linux 6.4 and Ubuntu distros). After reading previous topics I tried to run a test on my training machine, but I have the same issue.

I have no idea… can you help me to solve that?

Thanks

Hi,

I apologize for the insistence… but can you help me to fix that?

Thanks for support,

Hi @welingtonveiga,

It’s hard to debug actually as I never encountered this issue and the error is not very explicit. Did you try to train on the Ubuntu machine instead?

Hi @guillaumekln!
When I tried it on my Ubuntu machine everything is OK.
Now, I’m running a simple example on my main training server to give you more information about the problem.
Thanks,