mboudiaf/RePRI-for-Few-Shot-Segmentation

a error about connection

9p15p opened this issue · 1 comments

9p15p commented
(repri) ldz@ldz-cy620:~/temp_project/RePRI$ bash scripts/train.sh pascal 0 [0] 50
Setting up a new session...
Traceback (most recent call last):
  File "/home/ldz/anaconda3/envs/repri/lib/python3.9/site-packages/urllib3/connection.py", line 169, in _new_conn
    conn = connection.create_connection(
  File "/home/ldz/anaconda3/envs/repri/lib/python3.9/site-packages/urllib3/util/connection.py", line 96, in create_connection
    raise err
  File "/home/ldz/anaconda3/envs/repri/lib/python3.9/site-packages/urllib3/util/connection.py", line 86, 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 "/home/ldz/anaconda3/envs/repri/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/home/ldz/anaconda3/envs/repri/lib/python3.9/site-packages/urllib3/connectionpool.py", line 394, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/home/ldz/anaconda3/envs/repri/lib/python3.9/site-packages/urllib3/connection.py", line 234, in request
    super(HTTPConnection, self).request(method, url, body=body, headers=headers)
  File "/home/ldz/anaconda3/envs/repri/lib/python3.9/http/client.py", line 1255, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/home/ldz/anaconda3/envs/repri/lib/python3.9/http/client.py", line 1301, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/home/ldz/anaconda3/envs/repri/lib/python3.9/http/client.py", line 1250, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/home/ldz/anaconda3/envs/repri/lib/python3.9/http/client.py", line 1010, in _send_output
    self.send(msg)
  File "/home/ldz/anaconda3/envs/repri/lib/python3.9/http/client.py", line 950, in send
    self.connect()
  File "/home/ldz/anaconda3/envs/repri/lib/python3.9/site-packages/urllib3/connection.py", line 200, in connect
    conn = self._new_conn()
  File "/home/ldz/anaconda3/envs/repri/lib/python3.9/site-packages/urllib3/connection.py", line 181, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f9a6416e8e0>: Failed to establish a new connection: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ldz/anaconda3/envs/repri/lib/python3.9/site-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/home/ldz/anaconda3/envs/repri/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "/home/ldz/anaconda3/envs/repri/lib/python3.9/site-packages/urllib3/util/retry.py", line 573, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8098): Max retries exceeded with url: /env/main (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f9a6416e8e0>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ldz/anaconda3/envs/repri/lib/python3.9/site-packages/visdom/__init__.py", line 708, in _send
    return self._handle_post(
  File "/home/ldz/anaconda3/envs/repri/lib/python3.9/site-packages/visdom/__init__.py", line 677, in _handle_post
    r = self.session.post(url, data=data)
  File "/home/ldz/anaconda3/envs/repri/lib/python3.9/site-packages/requests/sessions.py", line 590, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/home/ldz/anaconda3/envs/repri/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/ldz/anaconda3/envs/repri/lib/python3.9/site-packages/requests/sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "/home/ldz/anaconda3/envs/repri/lib/python3.9/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8098): Max retries exceeded with url: /env/main (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f9a6416e8e0>: Failed to establish a new connection: [Errno 111] Connection refused'))
[Errno 111] Connection refused
  0%|                                                                                                                                                                                                  | 0/5953 [00:00<?, ?it/s]==> Running process rank 0.
Exception in user code:
------------------------------------------------------------
Processing data for [6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 5953/5953 [00:00<00:00, 9114.94it/s]
Traceback (most recent call last):
  File "/home/ldz/anaconda3/envs/repri/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/ldz/anaconda3/envs/repri/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/ldz/temp_project/RePRI/src/train.py", line 328, in <module>
    mp.spawn(main_worker,
  File "/home/ldz/anaconda3/envs/repri/lib/python3.9/site-packages/torch/multiprocessing/spawn.py", line 199, in spawn
    return start_processes(fn, args, nprocs, join, daemon, start_method='spawn')
  File "/home/ldz/anaconda3/envs/repri/lib/python3.9/site-packages/torch/multiprocessing/spawn.py", line 157, in start_processes
    while not context.join():
  File "/home/ldz/anaconda3/envs/repri/lib/python3.9/site-packages/torch/multiprocessing/spawn.py", line 118, in join
    raise Exception(msg)
Exception: 

-- Process 0 terminated with the following error:
multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/home/ldz/anaconda3/envs/repri/lib/python3.9/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/home/ldz/anaconda3/envs/repri/lib/python3.9/multiprocessing/pool.py", line 48, in mapstar
    return list(map(*args))
  File "/home/ldz/temp_project/RePRI/src/dataset/utils.py", line 86, in process_image
    assert label_class_ in list(range(1, 81)), label_class_
AssertionError: None
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/ldz/anaconda3/envs/repri/lib/python3.9/site-packages/torch/multiprocessing/spawn.py", line 19, in _wrap
    fn(i, *args)
  File "/home/ldz/temp_project/RePRI/src/train.py", line 80, in main_worker
    train_loader, train_sampler = get_train_loader(args)
  File "/home/ldz/temp_project/RePRI/src/dataset/dataset.py", line 39, in get_train_loader
    train_data = StandardData(transform=train_transform,
  File "/home/ldz/temp_project/RePRI/src/dataset/dataset.py", line 120, in __init__
    self.data_list, _ = make_dataset(args.data_root, data_list_path, class_list)
  File "/home/ldz/temp_project/RePRI/src/dataset/utils.py", line 52, in make_dataset
    for sublist, subdict in mmap_(process_partial, tqdm(list_read)):
  File "/home/ldz/temp_project/RePRI/src/dataset/utils.py", line 17, in mmap_
    return Pool().map(fn, iter)
  File "/home/ldz/anaconda3/envs/repri/lib/python3.9/multiprocessing/pool.py", line 364, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/home/ldz/anaconda3/envs/repri/lib/python3.9/multiprocessing/pool.py", line 771, in get
    raise self._value
AssertionError: None

  1. You are receiving the connection error because you did not launch the visdom server as detailed in the README.md . If you don't want to use visdom to monitor metrics, please remove the option "visdom_port 8098" in the scripts.

  2. The error that actually breaks here comes from your data. So there must have been an issue in the way your data/ folder was created. I have updated the README.md with more precise info about where to get the data from in case the google download failed. Make sure you have everything in the right format.