‘’‘
norm lattice embedding
Traceback (most recent call last):
File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/urllib3/connection.py", line 179, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/urllib3/util/connection.py", line 95, in create_connection
raise err
File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/urllib3/util/connection.py", line 85, in create_connection
sock.connect(sa)
TimeoutError: [Errno 110] Connection timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/urllib3/connectionpool.py", line 710, in urlopen
chunked=chunked,
File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/urllib3/connectionpool.py", line 398, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/urllib3/connection.py", line 243, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/http/client.py", line 1229, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/http/client.py", line 1275, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/http/client.py", line 1224, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/http/client.py", line 1016, in _send_output
self.send(msg)
File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/http/client.py", line 956, in send
self.connect()
File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/urllib3/connection.py", line 209, in connect
conn = self._new_conn()
File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/urllib3/connection.py", line 191, in _new_conn
self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f1be5840588>: Failed to establish a new connection: [Errno 110] Connection timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/requests/adapters.py", line 450, in send
timeout=timeout
File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/urllib3/connectionpool.py", line 786, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/urllib3/util/retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='212.129.155.247', port=80): Max retries exceeded with url: /embedding/bert-chinese-wwm.zip (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f1be5840588>: Failed to establish a new connection: [Errno 110] Connection timed out'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "msra.py", line 23, in
inner_metric = flat_main(dataset=data, head_dim=20,head=10,device=device,ck=checkpoint,output_dir=output_dir )
File "../modeling/flat_main_evaluate.py", line 539, in flat_main
word_dropout=0.01)
File "../fastNLP_module.py", line 364, in init
pooled_cls=pooled_cls, auto_truncate=auto_truncate, min_freq=2)
File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/fastNLP/embeddings/bert_embedding.py", line 233, in init
self.tokenzier = BertTokenizer.from_pretrained(model_dir_or_name)
File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/fastNLP/modules/encoder/bert.py", line 943, in from_pretrained
model_dir = _get_bert_dir(model_dir_or_name)
File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/fastNLP/modules/encoder/bert.py", line 160, in _get_bert_dir
model_dir = cached_path(model_url, name='embedding')
File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/fastNLP/io/file_utils.py", line 171, in cached_path
return get_from_cache(url_or_filename, Path(data_cache))
File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/fastNLP/io/file_utils.py", line 372, in get_from_cache
req = requests.get(url, stream=True, headers={"User-Agent": "fastNLP"})
File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/requests/api.py", line 75, in get
return request('get', url, params=params, kwargs)
File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, kwargs)
File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/requests/sessions.py", line 529, in request
resp = self.send(prep, send_kwargs)
File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/requests/sessions.py", line 645, in send
r = adapter.send(request, kwargs)
File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/requests/adapters.py", line 519, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='212.129.155.247', port=80): Max retries exceeded with url: /embedding/bert-chinese-wwm.zip (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f1be5840588>: Failed to establish a new connection: [Errno 110] Connection timed out'))
’‘’
这个报错在我运行train时也会产生
您好,我参照README.md进行配置,在进行到[Evaluate]步骤时出现如下报错
‘’‘ norm lattice embedding Traceback (most recent call last): File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/urllib3/connection.py", line 179, in _new_conn (self._dns_host, self.port), self.timeout, **extra_kw File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/urllib3/util/connection.py", line 95, in create_connection raise err File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/urllib3/util/connection.py", line 85, in create_connection sock.connect(sa) TimeoutError: [Errno 110] Connection timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/urllib3/connectionpool.py", line 710, in urlopen chunked=chunked, File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/urllib3/connectionpool.py", line 398, in _make_request conn.request(method, url, **httplib_request_kw) File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/urllib3/connection.py", line 243, in request super(HTTPConnection, self).request(method, url, body=body, headers=headers) File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/http/client.py", line 1229, in request self._send_request(method, url, body, headers, encode_chunked) File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/http/client.py", line 1275, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/http/client.py", line 1224, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/http/client.py", line 1016, in _send_output self.send(msg) File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/http/client.py", line 956, in send self.connect() File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/urllib3/connection.py", line 209, in connect conn = self._new_conn() File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/urllib3/connection.py", line 191, in _new_conn self, "Failed to establish a new connection: %s" % e urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f1be5840588>: Failed to establish a new connection: [Errno 110] Connection timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/requests/adapters.py", line 450, in send timeout=timeout File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/urllib3/connectionpool.py", line 786, in urlopen method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/urllib3/util/retry.py", line 592, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='212.129.155.247', port=80): Max retries exceeded with url: /embedding/bert-chinese-wwm.zip (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f1be5840588>: Failed to establish a new connection: [Errno 110] Connection timed out'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "msra.py", line 23, in
inner_metric = flat_main(dataset=data, head_dim=20,head=10,device=device,ck=checkpoint,output_dir=output_dir )
File "../modeling/flat_main_evaluate.py", line 539, in flat_main
word_dropout=0.01)
File "../fastNLP_module.py", line 364, in init
pooled_cls=pooled_cls, auto_truncate=auto_truncate, min_freq=2)
File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/fastNLP/embeddings/bert_embedding.py", line 233, in init
self.tokenzier = BertTokenizer.from_pretrained(model_dir_or_name)
File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/fastNLP/modules/encoder/bert.py", line 943, in from_pretrained
model_dir = _get_bert_dir(model_dir_or_name)
File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/fastNLP/modules/encoder/bert.py", line 160, in _get_bert_dir
model_dir = cached_path(model_url, name='embedding')
File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/fastNLP/io/file_utils.py", line 171, in cached_path
return get_from_cache(url_or_filename, Path(data_cache))
File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/fastNLP/io/file_utils.py", line 372, in get_from_cache
req = requests.get(url, stream=True, headers={"User-Agent": "fastNLP"})
File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/requests/api.py", line 75, in get
return request('get', url, params=params, kwargs)
File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, kwargs)
File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/requests/sessions.py", line 529, in request
resp = self.send(prep, send_kwargs)
File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/requests/sessions.py", line 645, in send
r = adapter.send(request, kwargs)
File "/home/ubuntu/anaconda3/envs/nerco/lib/python3.7/site-packages/requests/adapters.py", line 519, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='212.129.155.247', port=80): Max retries exceeded with url: /embedding/bert-chinese-wwm.zip (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f1be5840588>: Failed to establish a new connection: [Errno 110] Connection timed out'))
’‘’
这个报错在我运行train时也会产生
我使用的环境如下: OS: [Linux] Python Version [3.7]