-
-
Save ssnl/020fdb3d6b7016d81b6ba1d04cc41459 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- data_streamer.py 2018-12-18 13:27:03.000000000 +0800 | |
+++ data_streamer_new.py 2018-12-18 13:41:21.000000000 +0800 | |
@@ -10,15 +10,15 @@ | |
import torch | |
import torch.multiprocessing as multiprocessing | |
-from torch._C import ( | |
+ | |
+from torch._six import string_classes | |
+import torch.utils.data._utils | |
+from torch.utils.data._utils import ExceptionWrapper | |
+from torch.utils.data._utils.worker import ManagerWatchdog | |
+from torch.utils.data._utils.signal_handling import ( | |
+ _set_worker_pids, | |
_remove_worker_pids, | |
_set_worker_signal_handlers, | |
- _update_worker_pids, | |
-) | |
-from torch._six import string_classes | |
-from torch.utils.data.dataloader import ( | |
- ExceptionWrapper, | |
- ManagerWatchdog, | |
_set_SIGCHLD_handler, | |
) | |
@@ -224,7 +224,7 @@ | |
else: | |
self.data_queue = self.worker_result_queue | |
- _update_worker_pids(id(self), tuple(w.pid for w in self.workers)) | |
+ _set_worker_pids(id(self), tuple(w.pid for w in self.workers)) | |
_set_SIGCHLD_handler() | |
self.worker_pids_set = True | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment