matthew-z / R-net

R-net in PyTorch, with ELMo
MIT License
199 stars 43 forks source link

About the timeout problem #12

Closed Howardqlz closed 5 years ago

Howardqlz commented 5 years ago

I think this is a great work and i want to run this model to see the performence, but i met several problem and it's all about "timeout", "failed to establish a new connection " and so on like this:

_0it [00:00, ?it/s]Traceback (most recent call last): File "/home/lzqing/anaconda3/envs/allennlp/lib/python3.6/site-packages/urllib3/connection.py", line 171, in _new_conn (self._dns_host, self.port), self.timeout, **extra_kw) File "/home/lzqing/anaconda3/envs/allennlp/lib/python3.6/site-packages/urllib3/util/connection.py", line 79, in create_connection raise err File "/home/lzqing/anaconda3/envs/allennlp/lib/python3.6/site-packages/urllib3/util/connection.py", line 69, in createconnection sock.connect(sa) TimeoutError: [Errno 110] Connection timed out

It's seem that the model can't get the squad dataset from the url.I don't know it's because of the firewall or some other reason.If you know how to solve it please tell me and i will really appreciate that!

Howardqlz commented 5 years ago

I can open the url by the firefox, and i can choose the plan B that rewrite the path to the local file, maybe it's not a big problem.But i still wish your feedback if you know how to solve it.

matthew-z commented 5 years ago

I guess you have difficulty in downloading the dataset from aws s3?

I think it is because of the network environment of your GPU server.

Since the downloading is handled by allennlp.common.file_utils.cached_path, I wonder if you can run the following snippet in python on your server.

from allennlp.common.file_utils import cached_path
p =cached_path("https://s3-us-west-2.amazonaws.com/allennlp/datasets/squad/squad-train-v1.1.json")

Yes, you may download it by yourself and replace the URL in the config with the filepath.

Howardqlz commented 5 years ago

Thank you and i will try it.(It seems that the model works great, it's really fast.I think it's time to learn to use allennlp.Nice work! XD )

matthew-z commented 5 years ago

Closing due to a lack of update.