{"action":"opened","issue":{"url":"https://api.github.com/repos/pytorch/vision/issues/689","repository_url":"https://api.github.com/repos/pytorch/vision","labels_url":"https://api.github.com/repos/pytorch/vision/issues/689/labels{/name}","comments_url":"https://api.github.com/repos/pytorch/vision/issues/689/comments","events_url":"https://api.github.com/repos/pytorch/vision/issues/689/events","html_url":"https://github.com/pytorch/vision/issues/689","id":391756091,"node_id":"MDU6SXNzdWUzOTE3NTYwOTE=","number":689,"title":"TypeError: can't pickle Environment objects when num_workers > 0 for LSUN","user":{"login":"ArtjomUEA","id":45484357,"node_id":"MDQ6VXNlcjQ1NDg0MzU3","avatar_url":"https://avatars3.githubusercontent.com/u/45484357?v=4","gravatar_id":"","url":"https://api.github.com/users/ArtjomUEA","html_url":"https://github.com/ArtjomUEA","followers_url":"https://api.github.com/users/ArtjomUEA/followers","following_url":"https://api.github.com/users/ArtjomUEA/following{/other_user}","gists_url":"https://api.github.com/users/ArtjomUEA/gists{/gist_id}","starred_url":"https://api.github.com/users/ArtjomUEA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArtjomUEA/subscriptions","organizations_url":"https://api.github.com/users/ArtjomUEA/orgs","repos_url":"https://api.github.com/users/ArtjomUEA/repos","events_url":"https://api.github.com/users/ArtjomUEA/events{/privacy}","received_events_url":"https://api.github.com/users/ArtjomUEA/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-17T15:13:01Z","updated_at":"2018-12-17T15:13:01Z","closed_at":null,"author_association":"NONE","body":"The program fails to create an iterator for a DataLoader object when the used dataset is LSUN and the amount of workers is greater than zero. I do not have such an error when work with other datasets. Something tells me that the issue might be caused by lmdb. I run on Windows 10, CUDA 10.\r\n\r\n\r\nCode:\r\n```python\r\nimport torch.utils.data\r\nimport torchvision.datasets as dset\r\nimport torchvision.transforms as transforms\r\n\r\ndataset = dset.LSUN(root='D:/bedroom_train_lmdb', classes=['bedroom_train'],\r\n                            transform=transforms.Compose([\r\n                                transforms.Resize((64, 64)),\r\n                                transforms.ToTensor(),\r\n                                transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5)),\r\n                            ]))\r\n\r\ndataloader = torch.utils.data.DataLoader(dataset, batch_size=128,\r\n                                             shuffle=True, num_workers=4)\r\n\r\nfor data in dataloader:\r\n    print(data)\r\n```\r\nError:\r\n```python\r\nTraceback (most recent call last):\r\n  File \"C:/Users/x/.PyCharm2018.3/config/scratches/scratch.py\", line 15, in <module>\r\n    for data in dataloader:\r\n  File \"C:\\Anaconda3\\lib\\site-packages\\torch\\utils\\data\\dataloader.py\", line 819, in __iter__\r\n    return _DataLoaderIter(self)\r\n  File \"C:\\Anaconda3\\lib\\site-packages\\torch\\utils\\data\\dataloader.py\", line 560, in __init__\r\n    w.start()\r\n  File \"C:\\Anaconda3\\lib\\multiprocessing\\process.py\", line 112, in start\r\n    self._popen = self._Popen(self)\r\n  File \"C:\\Anaconda3\\lib\\multiprocessing\\context.py\", line 223, in _Popen\r\n    return _default_context.get_context().Process._Popen(process_obj)\r\n  File \"C:\\Anaconda3\\lib\\multiprocessing\\context.py\", line 322, in _Popen\r\n    return Popen(process_obj)\r\n  File \"C:\\Anaconda3\\lib\\multiprocessing\\popen_spawn_win32.py\", line 65, in __init__\r\n    reduction.dump(process_obj, to_child)\r\n  File \"C:\\Anaconda3\\lib\\multiprocessing\\reduction.py\", line 60, in dump\r\n    ForkingPickler(file, protocol).dump(obj)\r\nTypeError: can't pickle Environment objects\r\n```\r\n"}}
{"actor":{"display_login":"ArtjomUEA"}}