GaoQ1 / rasa_chatbot_cn

building a chinese dialogue system based on the newest version of rasa(基于最新版本rasa搭建的对话系统)
960 stars 290 forks source link

按照rasa对话系统踩坑记(八)跑bert-as-service服务,make train执行后,最后到Training NLU model这还是报错 #57

Closed pingyuan2016 closed 5 years ago

pingyuan2016 commented 5 years ago

2019-08-16 14:04:27 INFO rasa.core.agent - Persisted model to '/tmp/tmpg41ij8y1/core' Core model training completed. Training NLU model... Traceback (most recent call last): File "/home/duan/anaconda3/lib/python3.7/site-packages/bert_serving/client/init.py", line 206, in arg_wrapper return func(self, *args, **kwargs) File "/home/duan/anaconda3/lib/python3.7/site-packages/bert_serving/client/init.py", line 232, in server_status return jsonapi.loads(self._recv(req_id).content[1]) File "/home/duan/anaconda3/lib/python3.7/site-packages/bert_serving/client/init.py", line 164, in _recv raise e File "/home/duan/anaconda3/lib/python3.7/site-packages/bert_serving/client/init.py", line 153, in _recv response = self.receiver.recv_multipart() File "/home/duan/anaconda3/lib/python3.7/site-packages/zmq/sugar/socket.py", line 467, 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 "/home/duan/anaconda3/bin/rasa", line 11, in sys.exit(main()) File "/home/duan/anaconda3/lib/python3.7/site-packages/rasa/main.py", line 76, in main cmdline_arguments.func(cmdline_arguments) File "/home/duan/anaconda3/lib/python3.7/site-packages/rasa/cli/train.py", line 77, in train kwargs=extract_additional_arguments(args), File "/home/duan/anaconda3/lib/python3.7/site-packages/rasa/train.py", line 40, in train kwargs=kwargs, File "uvloop/loop.pyx", line 1451, in uvloop.loop.Loop.run_until_complete File "/home/duan/anaconda3/lib/python3.7/site-packages/rasa/train.py", line 87, in train_async kwargs, File "/home/duan/anaconda3/lib/python3.7/site-packages/rasa/train.py", line 169, in _train_async_internal kwargs=kwargs, File "/home/duan/anaconda3/lib/python3.7/site-packages/rasa/train.py", line 216, in _do_training fixed_model_name=fixed_model_name, File "/home/duan/anaconda3/lib/python3.7/site-packages/rasa/train.py", line 427, in _train_nlu_with_validated_data config, file_importer, _train_path, fixed_model_name="nlu" File "/home/duan/anaconda3/lib/python3.7/site-packages/rasa/nlu/train.py", line 67, in train trainer = Trainer(nlu_config, component_builder) File "/home/duan/anaconda3/lib/python3.7/site-packages/rasa/nlu/model.py", line 151, in init self.pipeline = self._build_pipeline(cfg, component_builder) File "/home/duan/anaconda3/lib/python3.7/site-packages/rasa/nlu/model.py", line 163, in _build_pipeline component = component_builder.create_component(component_cfg, cfg) File "/home/duan/anaconda3/lib/python3.7/site-packages/rasa/nlu/components.py", line 459, in create_component component = registry.create_component_by_config(component_config, cfg) File "/home/duan/anaconda3/lib/python3.7/site-packages/rasa/nlu/registry.py", line 196, in create_component_by_config return component_class.create(component_config, config) File "/home/duan/anaconda3/lib/python3.7/site-packages/rasa/nlu/components.py", line 244, in create return cls(component_config) File "/home/duan/anaconda3/lib/python3.7/site-packages/rasa_nlu_gao/featurizers/bert_vectors_featurizer.py", line 61, in init identity=identity File "/home/duan/anaconda3/lib/python3.7/site-packages/bert_serving/client/init.py", line 451, in init self.availablebc = [BertClient(**kwargs) for in range(max_concurrency)] File "/home/duan/anaconda3/lib/python3.7/site-packages/bert_serving/client/init.py", line 451, in self.availablebc = [BertClient(**kwargs) for in range(max_concurrency)] File "/home/duan/anaconda3/lib/python3.7/site-packages/bert_serving/client/init.py", line 108, in init s_status = self.server_status File "/home/duan/anaconda3/lib/python3.7/site-packages/bert_serving/client/init.py", line 215, in arg_wrapper _raise(t_e, _e) File "/home/duan/anaconda3/lib/python3.7/site-packages/bert_serving/client/_py3_var.py", line 9, in _raise raise t_e from _e TimeoutError: no response from the server (with "timeout"=10000 ms), please check the following:is the server still online? is the network broken? are "port" and "port_out" correct? are you encoding a huge amount of data whereas the timeout is too small for that? make: *** [Makefile:2: train] Error 1

如图 微信截图_20190816140643

pingyuan2016 commented 5 years ago

把num_worker=4改成num_worker=1就好了,资源不够了,记录下