pengwei-iie / Bert-THUCNews

MIT License
34 stars 16 forks source link

how to run, 是要启动什么服务吗 #2

Open SeekPoint opened 5 years ago

SeekPoint commented 5 years ago

ub16c9@ub16c9-gpu:/media/ub16c9/fcd84300-9270-4bbd-896a-5e04e79203b7/ub16_prj/Bert-THUCNews$ python3.6 run_rnn_bert.py WARNING: Logging before flag parsing goes to stderr. W0629 22:34:15.663942 140667570616064 init.py:308] Limited tf.compat.v2.summary API due to missing TensorBoard installation. Configuring RNN model... W0629 22:34:16.809418 140667570616064 deprecation_wrapper.py:119] From /media/ub16c9/fcd84300-9270-4bbd-896a-5e04e79203b7/ub16_prj/Bert-THUCNews/rnn_model_bert.py:41: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.

W0629 22:34:16.811356 140667570616064 deprecation.py:323] From /media/ub16c9/fcd84300-9270-4bbd-896a-5e04e79203b7/ub16_prj/Bert-THUCNews/rnn_model_bert.py:54: GRUCell.init (from tensorflow.python.ops.rnn_cell_impl) is deprecated and will be removed in a future version. Instructions for updating: This class is equivalent as tf.keras.layers.GRUCell, and will be replaced by that in Tensorflow 2.0. W0629 22:34:16.813925 140667570616064 deprecation.py:323] From /media/ub16c9/fcd84300-9270-4bbd-896a-5e04e79203b7/ub16_prj/Bert-THUCNews/rnn_model_bert.py:81: MultiRNNCell.init (from tensorflow.python.ops.rnn_cell_impl) is deprecated and will be removed in a future version. Instructions for updating: This class is equivalent as tf.keras.layers.StackedRNNCells, and will be replaced by that in Tensorflow 2.0. W0629 22:34:16.814352 140667570616064 deprecation.py:323] From /media/ub16c9/fcd84300-9270-4bbd-896a-5e04e79203b7/ub16_prj/Bert-THUCNews/rnn_model_bert.py:83: bidirectional_dynamic_rnn (from tensorflow.python.ops.rnn) is deprecated and will be removed in a future version. Instructions for updating: Please use keras.layers.Bidirectional(keras.layers.RNN(cell)), which is equivalent to this API W0629 22:34:16.814627 140667570616064 deprecation.py:323] From /usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/rnn.py:464: dynamic_rnn (from tensorflow.python.ops.rnn) is deprecated and will be removed in a future version. Instructions for updating: Please use keras.layers.RNN(cell), which is equivalent to this API W0629 22:34:17.022390 140667570616064 deprecation.py:506] From /usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/init_ops.py:1251: calling VarianceScaling.init (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version. Instructions for updating: Call initializer instance with the dtype argument instead of passing it to the constructor W0629 22:34:17.028081 140667570616064 deprecation.py:506] From /usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/rnn_cell_impl.py:564: calling Constant.init (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version. Instructions for updating: Call initializer instance with the dtype argument instead of passing it to the constructor W0629 22:34:17.036224 140667570616064 deprecation.py:506] From /usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/rnn_cell_impl.py:574: calling Zeros.init (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version. Instructions for updating: Call initializer instance with the dtype argument instead of passing it to the constructor W0629 22:34:17.273972 140667570616064 deprecation_wrapper.py:119] From /media/ub16c9/fcd84300-9270-4bbd-896a-5e04e79203b7/ub16_prj/Bert-THUCNews/data/cnews_loader_bert.py:151: The name tf.get_variable is deprecated. Please use tf.compat.v1.get_variable instead.

W0629 22:34:17.274117 140667570616064 deprecation_wrapper.py:119] From /media/ub16c9/fcd84300-9270-4bbd-896a-5e04e79203b7/ub16_prj/Bert-THUCNews/data/cnews_loader_bert.py:151: The name tf.random_normal is deprecated. Please use tf.random.normal instead.

W0629 22:34:17.295523 140667570616064 deprecation.py:323] From /media/ub16c9/fcd84300-9270-4bbd-896a-5e04e79203b7/ub16_prj/Bert-THUCNews/rnn_model_bert.py:99: dense (from tensorflow.python.layers.core) is deprecated and will be removed in a future version. Instructions for updating: Use keras.layers.dense instead. W0629 22:34:17.533622 140667570616064 deprecation.py:323] From /media/ub16c9/fcd84300-9270-4bbd-896a-5e04e79203b7/ub16_prj/Bert-THUCNews/rnn_model_bert.py:109: softmax_cross_entropy_with_logits (from tensorflow.python.ops.nn_ops) is deprecated and will be removed in a future version. Instructions for updating:

Future major versions of TensorFlow will allow gradients to flow into the labels input on backprop by default.

See tf.nn.softmax_cross_entropy_with_logits_v2.

W0629 22:34:17.548146 140667570616064 deprecation_wrapper.py:119] From /media/ub16c9/fcd84300-9270-4bbd-896a-5e04e79203b7/ub16_prj/Bert-THUCNews/rnn_model_bert.py:112: The name tf.train.AdamOptimizer is deprecated. Please use tf.compat.v1.train.AdamOptimizer instead.

Configuring TensorBoard and Saver... W0629 22:34:18.168177 140667570616064 deprecation_wrapper.py:119] From run_rnn_bert.py:67: The name tf.summary.scalar is deprecated. Please use tf.compat.v1.summary.scalar instead.

W0629 22:34:18.169812 140667570616064 deprecation_wrapper.py:119] From run_rnn_bert.py:69: The name tf.summary.merge_all is deprecated. Please use tf.compat.v1.summary.merge_all instead.

W0629 22:34:18.170363 140667570616064 deprecation_wrapper.py:119] From run_rnn_bert.py:70: The name tf.summary.FileWriter is deprecated. Please use tf.compat.v1.summary.FileWriter instead.

W0629 22:34:18.170735 140667570616064 deprecation_wrapper.py:119] From run_rnn_bert.py:73: The name tf.train.Saver is deprecated. Please use tf.compat.v1.train.Saver instead.

Loading training and validation data... Traceback (most recent call last): File "/media/ub16c9/fcd84300-9270-4bbd-896a-5e04e79203b7/ub16_prj/Bert-THUCNews/bert_serving/client/init.py", line 178, in server_status return jsonapi.loads(self._recv().content[1]) File "/media/ub16c9/fcd84300-9270-4bbd-896a-5e04e79203b7/ub16_prj/Bert-THUCNews/bert_serving/client/init.py", line 133, in _recv response = self.receiver.recv_multipart() File "/usr/local/lib/python3.6/dist-packages/zmq/sugar/socket.py", line 470, in recv_multipart parts = [self.recv(flags, copy=copy, track=track)] File "zmq/backend/cython/socket.pyx", line 788, in zmq.backend.cython.socket.Socket.recv File "zmq/backend/cython/socket.pyx", line 824, in zmq.backend.cython.socket.Socket.recv File "zmq/backend/cython/socket.pyx", line 191, in zmq.backend.cython.socket._recv_copy File "zmq/backend/cython/socket.pyx", line 186, in zmq.backend.cython.socket._recv_copy File "zmq/backend/cython/checkrc.pxd", line 19, in zmq.backend.cython.checkrc._check_rc zmq.error.Again: Resource temporarily unavailable

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "run_rnn_bert.py", line 206, in train() File "run_rnn_bert.py", line 85, in train bc = BertClient() File "/media/ub16c9/fcd84300-9270-4bbd-896a-5e04e79203b7/ub16_prj/Bert-THUCNews/bert_serving/client/init.py", line 103, in init s_status = self.server_status File "/media/ub16c9/fcd84300-9270-4bbd-896a-5e04e79203b7/ub16_prj/Bert-THUCNews/bert_serving/client/init.py", line 186, in server_status raise t_e from _e TimeoutError: no response from the server (with "timeout"=5000 ms), is the server on-line? is network broken? are "port" and "port_out" correct?

^C ub16c9@ub16c9-gpu:/media/ub16c9/fcd84300-9270-4bbd-896a-5e04e79203b7/ub16_prj/Bert-THUCNews$