Received 0 items of ancdata Pytorch 0.4.0

Upon iterating over the dataloader I receive RuntimeError: received 0 items of ancdata. I tried by increasing number of open file descriptors as shown in but to no avail. Can someone please guide how this error could be prevented.
x, (y_l, y_ab) = next(loader)
where loader is defined as following
loader = cycle(train_dataloader)

The complete error traceback is given below.

Traceback (most recent call last):
  File "", line 267, in <module>
  File "", line 263, in main
    train(g_model, d_model, learning_rate_ae, learning_rate_color, train_dataloader, test_dataloader, now)
  File "", line 111, in train
    x, (y_l, y_ab) = next(loader)
  File "/home/thor/anaconda3/envs/torch3env/lib/python3.6/site-packages/torch/utils/data/", line 280, in __next__
    idx, batch = self._get_batch()
  File "/home/thor/anaconda3/envs/torch3env/lib/python3.6/site-packages/torch/utils/data/", line 259, in _get_batch
    return self.data_queue.get()
  File "/home/thor/anaconda3/envs/torch3env/lib/python3.6/multiprocessing/", line 337, in get
    return _ForkingPickler.loads(res)
  File "/home/thor/anaconda3/envs/torch3env/lib/python3.6/site-packages/torch/multiprocessing/", line 70, in rebuild_storage_fd
    fd = df.detach()
  File "/home/thor/anaconda3/envs/torch3env/lib/python3.6/multiprocessing/", line 58, in detach
    return reduction.recv_handle(conn)
  File "/home/thor/anaconda3/envs/torch3env/lib/python3.6/multiprocessing/", line 182, in recv_handle
    return recvfds(s, 1)[0]
  File "/home/thor/anaconda3/envs/torch3env/lib/python3.6/multiprocessing/", line 161, in recvfds
RuntimeError: received 0 items of ancdata
1 Like

Also having this issue. My sharing strategy is file_descriptor

Can you share your snippet as well ?


solved the problem for me.


echo "ulimit -n 4096" >> .bashrc
echo "ulimit -n 4096" >> .bash_profile
source ~/.bashrc