th tools/rest_translation_server.lua -model ~/models/_epoch25_1.00.t7 -gpuid 1
[01/03/18 11:09:59 INFO] Using GPU(s): 1
[01/03/18 11:09:59 WARNING] The caching CUDA memory allocator is enabled. This allocator improves performance at the cost of a higher GPU memory usage. To optimize for memory, consider disabling it by setting the environment variable: THC_CACHING_ALLOCATOR=0
[01/03/18 11:09:59 INFO] Loading model
[01/03/18 11:09:59 INFO] Loading ‘/home/German/models/_epoch25_1.00.t7’…
[01/03/18 11:10:00 INFO] Model seq2seq trained on bitext
[01/03/18 11:10:00 INFO] Launch server
Xavante started on port(s) 7784
upload completely sent off: 35 out of 35 bytes
< HTTP/1.1 500 Internal Server Error
< Content-Type: text/plain
< Date: Wed, 03 Jan 2018 10:14:01 GMT
< Server: RestServer
< Content-Length: 193
<
Connection #0 to host 127.0.0.1 left intact
500 Internal Server Error - Error in application: tools/rest_translation_server.lua:105: unicode error in line tools/rest_translation_server.lua:98: attempt to index field ‘preds’ (a nil value)
Has anyone else get this error too? I instaled luarocks install restserver-xavante and luarocks install nn
Ran luarocks install torch; luarocks install nn;, then cd /OpenNMT09/OpenNMT; th tools/rest_multi_models.lua -model_config /Engines/server/models_cfg.yml -gpuid 1 -log_level DEBUG.
I see Xavante started on port(s) 7784, but when sending the request like curl -v -H "Content-Type: application/json" -X POST -d '[{ "src" : "Hello World", "id" : 1 }]' http://127.0.0.1:7784/translator/translate (or even with "id": 0) I get
* upload completely sent off: 37 out of 37 bytes
< HTTP/1.1 500 Internal Server Error
< Content-Type: application/json
< Date: Thu, 29 Mar 2018 13:51:11 GMT
< Server: SGA
< Content-Length: 4
Any ideas what is going on? Note I tried to add gpuid: 1 to the model options in the config file, too, it does not change anything.
Yes, sure, I would not have started the server without it, would I? I followed the steps described at http://opennmt.net/OpenNMT/tools/servers. luarocks install restserver-xavante and luarocks install yaml are the first steps. I am launching the server and send requests with superuser permissions.
and sent the translation request again curl -v -H "Content-Type: application/json" -X POST -d '[{ "src" : "What is going on?" }]' http://127.0.0.1:7784/translator/translate. Now, the server debug shows
* upload completely sent off: 33 out of 33 bytes
< HTTP/1.1 500 Internal Server Error
< Content-Type: text/plain
< Date: Fri, 30 Mar 2018 08:18:47 GMT
< Server: RestServer
< Content-Length: 193
<
* Connection #0 to host 127.0.0.1 left intact
500 Internal Server Error - Error in application: tools/rest_translation_server.lua:60: unicode error in line ./tools/utils/tokenizer.lua:340: attempt to index field 'hookManager' (a nil value)
Hi guys, I’m having the same issue with the rest_multi_models.lua . In my case I have nvidia-docker container, with mkl compiled lua. Translations on GPU and CPU work fine on rest_translation_server.lua .
CPU tranlations work on the rest_multi_models.lua as well, but I get 500 Internal Server Error, when translating on GPU.
Container started, things look good:
[06/18/18 08:36:58 INFO] Using GPU(s): 1
[06/18/18 08:36:58 INFO] Launch server
Xavante started on port(s) 7784