OpenNMT / nmt-wizard-docker

Dockerized NMT frameworks for nmt-wizard

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when running models exported with OpenNMT-tf 2.x

sriram-c opened this issue · comments

Hi,

I have exported my model under Tensorflow version - 2 . While running the model in the docker, I am getting the following error.

2019-12-08 05:30:41.677975: W external/org_tensorflow/tensorflow/core/kernels/partitioned_function_ops.cc:197] Grappler optimization failed. Error: Op type not registered 'TensorListResize' in binary running on fa9fd00430b8. Make sure the Op and Kernel are registered in the binary running in this process. Note that if you are loading a saved graph which used ops from tf.contrib, accessing (e.g.) tf.contrib.resampler should be done before importing the graph, as contrib ops are lazily registered when the module is first accessed.
2019-12-08 05:30:41.691354: W external/org_tensorflow/tensorflow/core/framework/op_kernel.cc:1401] OP_REQUIRES failed at partitioned_function_ops.cc:118 : Not found: Op type not registered 'SelectV2' in binary running on fa9fd00430b8. Make sure the Op and Kernel are registered in the binary running in this process. Note that if you are loading a saved graph which used ops from tf.contrib, accessing (e.g.) tf.contrib.resampler should be done before importing the graph, as contrib ops are lazily registered when the module is first accessed.
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 596, in process_request_thread
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 652, in init
self.handle()
File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
self.handle_one_request()
File "/usr/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
method()
File "/root/nmtwizard/serving.py", line 67, in do_POST
self.translate()
File "/root/nmtwizard/serving.py", line 95, in translate
self.handle_request(body)
File "/root/nmtwizard/serving.py", line 178, in handle_request
timeout=timeout))
File "entrypoint.py", line 132, in forward_request
result = future.result()
File "/usr/local/lib/python2.7/dist-packages/grpc/_channel.py", line 295, in result
raise self
_Rendezvous: <_Rendezvous of RPC that terminated with:
status = StatusCode.NOT_FOUND
details = "Op type not registered 'SelectV2' in binary running on fa9fd00430b8. Make sure the Op and Kernel are registered in the binary running in this process. Note that if you are loading a saved graph which used ops from tf.contrib, accessing (e.g.) tf.contrib.resampler should be done before importing the graph, as contrib ops are lazily registered when the module is first accessed.
[[{{node StatefulPartitionedCall}}]]
[[{{node StatefulPartitionedCall_4}}]]"
debug_error_string = "{"created":"@1575783041.691924540","description":"Error received from peer ipv4:127.0.0.1:44553","file":"src/core/lib/surface/call.cc","file_line":1046,"grpc_message":"Op type not registered 'SelectV2' in binary running on fa9fd00430b8. Make sure the Op and Kernel are registered in the binary running in this process. Note that if you are loading a saved graph which used ops from tf.contrib, accessing (e.g.) tf.contrib.resampler should be done before importing the graph, as contrib ops are lazily registered when the module is first accessed.\n\t [[{{node StatefulPartitionedCall}}]]\n\t [[{{node StatefulPartitionedCall_4}}]]","grpc_status":5}"

I am able to run my old exported models which is under tensorflow old versions.

Please guide me solve this issue.

Thanks,
Sriram

The Docker image nmtwizard/opennmt-tf has not been updated to support OpenNMT-tf 2.x yet. It should happen in the coming weeks.

Let's keep this issue open until this is resolved.