terrifyzhao / bert-utils

一行代码使用BERT生成句向量,BERT做文本分类、文本相似度计算

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

模型训练正常,auc较好,设置为PREDICT模式时候抛错issue 3770

CindyHuang-cn opened this issue · comments

代码执行到 sim.set_mode(tf.estimator.ModeKeys.PREDICT)时候抛错:
, '_keep_checkpoint_max': 5, '_task_type': 'worker', '_train_distribute': None, '_is_chief': True, '_cluster_spec': <tensorflow.python.training.server_lib.ClusterSpec object at 0x7fe518b13e10>, '_evaluation_master': '', '_save_checkpoints_steps': None, '_keep_checkpoint_every_n_hours': 10000, '_service': None, '_num_ps_replicas': 0, '_tf_random_seed': None, '_master': '', '_num_worker_replicas': 1, '_task_id': 0, '_log_step_count_steps': 100, '_model_dir': '/home/huangxinyi01/kr_lp_relative/bert-utils-master/chinese_L-12_H-768_A-12/../tmp/result/', '_global_id_in_cluster': 0, '_save_summary_steps': 100}
Traceback (most recent call last):
File "similarity_test_only.py", line 683, in
sim.set_mode(tf.estimator.ModeKeys.PREDICT)
File "similarity_test_only.py", line 139, in set_mode
self.input_queue = Queue(maxsize=1)
File "/home/huangxinyi01/python2.7.8-cpu-tf1.8.0/python2.7.8/lib/python2.7/multiprocessing/init.py", line 217, in Queue
from multiprocessing.queues import Queue
File "/home/huangxinyi01/python2.7.8-cpu-tf1.8.0/python2.7.8/lib/python2.7/multiprocessing/queues.py", line 48, in
from multiprocessing.synchronize import Lock, BoundedSemaphore, Semaphore, Condition
File "/home/huangxinyi01/python2.7.8-cpu-tf1.8.0/python2.7.8/lib/python2.7/multiprocessing/synchronize.py", line 59, in
" function, see issue 3770.")