atselousov / transformer_chatbot

Convai2 submission.
GNU Affero General Public License v3.0
294 stars 54 forks source link

ValueError: Connection to retrieval server is failed when sh docker_eval_fi.sh #16

Closed jeonggwanlee closed 5 years ago

jeonggwanlee commented 5 years ago

Hi, I wanted to test transformer_chatbot and apply my task. I followed the README.md(install nvidia-docker, prepareenvironment.sh) and tried to run environment/docker{}.sh. And I got messages such that,

jglee@jglee-System-Product-Name:~/Research/transformer_chatbot$ sh environment/docker_eval_fi.sh [sudo] password for jglee: /opt/conda/lib/python3.6/site-packages/nltk/twitter/init.py:20: UserWarning: The twython library has not been installed. Some functionality from the twitter package will not be available. warnings.warn("The twython library has not been installed. " [ optional arguments: ] [ aggregate_micro: False ] [ display_examples: False ] [ log_every_n_secs: 2 ] [ metrics: f1 ] [ num_examples: -1 ] [ Main ParlAI Arguments: ] [ batchsize: 20 ] [ datapath: /workspace/ParlAI/data ] [ datatype: valid ] [ download_path: /workspace/ParlAI/downloads ] [ hide_labels: False ] [ image_mode: raw ] [ init_opt: None ] [ multitask_weights: [1] ] [ numthreads: 1 ] [ show_advanced_args: False ] [ task: convai2:self:no_cands ] [ ParlAI Model Arguments: ] [ dict_class: None ] [ init_model: None ] [ model: agent:TransformerAgent ] [ model_file: None ] [ PytorchData Arguments: ] [ batch_length_range: 5 ] [ batch_sort_cache_type: pop ] [ batch_sort_field: text ] [ numworkers: 4 ] [ pytorch_context_length: -1 ] [ pytorch_datapath: None ] [ pytorch_include_labels: True ] [ pytorch_preprocess: False ] [ pytorch_teacher_batch_sort: False ] [ pytorch_teacher_dataset: None ] [ pytorch_teacher_task: None ] [ shuffle: False ] [ Tensorboard Arguments: ] [ tensorboard_comment: ] [ tensorboard_log: False ] [ tensorboard_metrics: None ] [ tensorboard_tag: None ] [ ParlAI Image Preprocessing Arguments: ] [ image_cropsize: 224 ] [ image_size: 256 ] [ Agent parameters: ] [ add_questions: 0 ] [ annealing: 0 ] [ annealing_topk: None ] [ beam_size: 3 ] [ check_grammar: False ] [ clean_emoji: False ] [ correct_generative: False ] [ detokenize: False ] [ diversity_coef: 0 ] [ diversity_groups: 1 ] [ emoji_prob: 0 ] [ gpu: -1 ] [ length_penalty: 0.6 ] [ max_seq_len: 256 ] [ ngram_size: 3 ] [ no_cuda: False ] [ rank_candidates: False ] [ replace_ngram: False ] [ replace_repeat: False ] [ sample: False ] [ split_into_sentences: False ] [ wild_mode: False ] HEAD http://localhost:9200/ [status:N/A request:0.000s] Traceback (most recent call last): File "/opt/conda/lib/python3.6/site-packages/urllib3/connection.py", line 141, in _new_conn (self.host, self.port), self.timeout, **extra_kw) File "/opt/conda/lib/python3.6/site-packages/urllib3/util/connection.py", line 83, in create_connection raise err File "/opt/conda/lib/python3.6/site-packages/urllib3/util/connection.py", line 73, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/opt/conda/lib/python3.6/site-packages/elasticsearch/connection/http_urllib3.py", line 172, in perform_request response = self.pool.urlopen(method, url, body, retries=Retry(False), headers=request_headers, kw) File "/opt/conda/lib/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen _stacktrace=sys.exc_info()[2]) File "/opt/conda/lib/python3.6/site-packages/urllib3/util/retry.py", line 333, in increment raise six.reraise(type(error), error, _stacktrace) File "/opt/conda/lib/python3.6/site-packages/urllib3/packages/six.py", line 686, in reraise raise value File "/opt/conda/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen chunked=chunked) File "/opt/conda/lib/python3.6/site-packages/urllib3/connectionpool.py", line 357, in _make_request conn.request(method, url, httplib_request_kw) File "/opt/conda/lib/python3.6/http/client.py", line 1239, in request self._send_request(method, url, body, headers, encode_chunked) File "/opt/conda/lib/python3.6/http/client.py", line 1285, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/opt/conda/lib/python3.6/http/client.py", line 1234, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/opt/conda/lib/python3.6/http/client.py", line 1026, in _send_output self.send(msg) File "/opt/conda/lib/python3.6/http/client.py", line 964, in send self.connect() File "/opt/conda/lib/python3.6/site-packages/urllib3/connection.py", line 166, in connect conn = self._new_conn() File "/opt/conda/lib/python3.6/site-packages/urllib3/connection.py", line 150, in _new_conn self, "Failed to establish a new connection: %s" % e) urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f5c329a78d0>: Failed to establish a new connection: [Errno 111] Connection refused HEAD http://localhost:9200/ [status:N/A request:0.001s] Traceback (most recent call last): File "/opt/conda/lib/python3.6/site-packages/urllib3/connection.py", line 141, in _new_conn (self.host, self.port), self.timeout, **extra_kw) File "/opt/conda/lib/python3.6/site-packages/urllib3/util/connection.py", line 83, in create_connection raise err File "/opt/conda/lib/python3.6/site-packages/urllib3/util/connection.py", line 73, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/opt/conda/lib/python3.6/site-packages/elasticsearch/connection/http_urllib3.py", line 172, in perform_request response = self.pool.urlopen(method, url, body, retries=Retry(False), headers=request_headers, kw) File "/opt/conda/lib/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen _stacktrace=sys.exc_info()[2]) File "/opt/conda/lib/python3.6/site-packages/urllib3/util/retry.py", line 333, in increment raise six.reraise(type(error), error, _stacktrace) File "/opt/conda/lib/python3.6/site-packages/urllib3/packages/six.py", line 686, in reraise raise value File "/opt/conda/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen chunked=chunked) File "/opt/conda/lib/python3.6/site-packages/urllib3/connectionpool.py", line 357, in _make_request conn.request(method, url, httplib_request_kw) File "/opt/conda/lib/python3.6/http/client.py", line 1239, in request self._send_request(method, url, body, headers, encode_chunked) File "/opt/conda/lib/python3.6/http/client.py", line 1285, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/opt/conda/lib/python3.6/http/client.py", line 1234, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/opt/conda/lib/python3.6/http/client.py", line 1026, in _send_output self.send(msg) File "/opt/conda/lib/python3.6/http/client.py", line 964, in send self.connect() File "/opt/conda/lib/python3.6/site-packages/urllib3/connection.py", line 166, in connect conn = self._new_conn() File "/opt/conda/lib/python3.6/site-packages/urllib3/connection.py", line 150, in _new_conn self, "Failed to establish a new connection: %s" % e) urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f5c329a7978>: Failed to establish a new connection: [Errno 111] Connection refused HEAD http://localhost:9200/ [status:N/A request:0.001s] Traceback (most recent call last): File "/opt/conda/lib/python3.6/site-packages/urllib3/connection.py", line 141, in _new_conn (self.host, self.port), self.timeout, **extra_kw) File "/opt/conda/lib/python3.6/site-packages/urllib3/util/connection.py", line 83, in create_connection raise err File "/opt/conda/lib/python3.6/site-packages/urllib3/util/connection.py", line 73, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/opt/conda/lib/python3.6/site-packages/elasticsearch/connection/http_urllib3.py", line 172, in perform_request response = self.pool.urlopen(method, url, body, retries=Retry(False), headers=request_headers, kw) File "/opt/conda/lib/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen _stacktrace=sys.exc_info()[2]) File "/opt/conda/lib/python3.6/site-packages/urllib3/util/retry.py", line 333, in increment raise six.reraise(type(error), error, _stacktrace) File "/opt/conda/lib/python3.6/site-packages/urllib3/packages/six.py", line 686, in reraise raise value File "/opt/conda/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen chunked=chunked) File "/opt/conda/lib/python3.6/site-packages/urllib3/connectionpool.py", line 357, in _make_request conn.request(method, url, httplib_request_kw) File "/opt/conda/lib/python3.6/http/client.py", line 1239, in request self._send_request(method, url, body, headers, encode_chunked) File "/opt/conda/lib/python3.6/http/client.py", line 1285, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/opt/conda/lib/python3.6/http/client.py", line 1234, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/opt/conda/lib/python3.6/http/client.py", line 1026, in _send_output self.send(msg) File "/opt/conda/lib/python3.6/http/client.py", line 964, in send self.connect() File "/opt/conda/lib/python3.6/site-packages/urllib3/connection.py", line 166, in connect conn = self._new_conn() File "/opt/conda/lib/python3.6/site-packages/urllib3/connection.py", line 150, in _new_conn self, "Failed to establish a new connection: %s" % e) urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f5c329a7ac8>: Failed to establish a new connection: [Errno 111] Connection refused HEAD http://localhost:9200/ [status:N/A request:0.001s] Traceback (most recent call last): File "/opt/conda/lib/python3.6/site-packages/urllib3/connection.py", line 141, in _new_conn (self.host, self.port), self.timeout, **extra_kw) File "/opt/conda/lib/python3.6/site-packages/urllib3/util/connection.py", line 83, in create_connection raise err File "/opt/conda/lib/python3.6/site-packages/urllib3/util/connection.py", line 73, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/opt/conda/lib/python3.6/site-packages/elasticsearch/connection/http_urllib3.py", line 172, in perform_request response = self.pool.urlopen(method, url, body, retries=Retry(False), headers=request_headers, kw) File "/opt/conda/lib/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen _stacktrace=sys.exc_info()[2]) File "/opt/conda/lib/python3.6/site-packages/urllib3/util/retry.py", line 333, in increment raise six.reraise(type(error), error, _stacktrace) File "/opt/conda/lib/python3.6/site-packages/urllib3/packages/six.py", line 686, in reraise raise value File "/opt/conda/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen chunked=chunked) File "/opt/conda/lib/python3.6/site-packages/urllib3/connectionpool.py", line 357, in _make_request conn.request(method, url, httplib_request_kw) File "/opt/conda/lib/python3.6/http/client.py", line 1239, in request self._send_request(method, url, body, headers, encode_chunked) File "/opt/conda/lib/python3.6/http/client.py", line 1285, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/opt/conda/lib/python3.6/http/client.py", line 1234, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/opt/conda/lib/python3.6/http/client.py", line 1026, in _send_output self.send(msg) File "/opt/conda/lib/python3.6/http/client.py", line 964, in send self.connect() File "/opt/conda/lib/python3.6/site-packages/urllib3/connection.py", line 166, in connect conn = self._new_conn() File "/opt/conda/lib/python3.6/site-packages/urllib3/connection.py", line 150, in _new_conn self, "Failed to establish a new connection: %s" % e) urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f5c32452550>: Failed to establish a new connection: [Errno 111] Connection refused Traceback (most recent call last): File "eval_f1.py", line 27, in eval_f1(opt, print_parser=parser) File "/workspace/ParlAI/projects/convai2/eval_f1.py", line 27, in eval_f1 report = eval_model(opt, print_parser) File "/workspace/ParlAI/parlai/scripts/eval_model.py", line 106, in eval_model agent = create_agent(opt, requireModelExists=True) File "/workspace/ParlAI/parlai/core/agents.py", line 639, in create_agent model = model_class(opt) File "/workspace/agent.py", line 80, in init split_into_sentences=self.opt['split_into_sentences']) File "/workspace/model/postprocessing.py", line 79, in init self._retrieval = RetrievalBot() File "/workspace/model/retrieval.py", line 65, in init raise ValueError('Connection to retrieval server is failed.') ValueError: Connection to retrieval server is failed.

What I realized is, the function "self.es.ping()" (line 64 in model/retrieval.py) returns False and it raises value error.

my environment is something wrong? Is there anyone who can help me?

Thank you for reading this!

jeonggwanlee commented 5 years ago

I solved it. I should execute "sh environment/run_reirievalserver.sh" first. then, execute "sh environment/docker{}.sh"