petecheng / Time2Graph

Source codes for Time2Graph model.
133 stars 33 forks source link

“paralleling utils”部分有这样的bug,请问是什么原因? #3

Open vanellope666 opened 2 years ago

vanellope666 commented 2 years ago

File "D:\Time2Graph\time2graph\utils\mp_utils.py", line 79, in run_slices monitor.start() File "C:\Users\Vanellope\AppData\Local\Programs\Python\Python37\lib\multiprocessing\process.py", line 112, in start self._popen = self._Popen(self) File "C:\Users\Vanellope\AppData\Local\Programs\Python\Python37\lib\multiprocessing\context.py", line 223, in _Popen return _default_context.get_context().Process._Popen(process_obj) File "C:\Users\Vanellope\AppData\Local\Programs\Python\Python37\lib\multiprocessing\context.py", line 322, in _Popen return Popen(process_obj) File "C:\Users\Vanellope\AppData\Local\Programs\Python\Python37\lib\multiprocessing\popen_spawn_win32.py", line 89, in init reduction.dump(process_obj, to_child) File "C:\Users\Vanellope\AppData\Local\Programs\Python\Python37\lib\multiprocessing\reduction.py", line 60, in dump ForkingPickler(file, protocol).dump(obj) AttributeError: Can't pickle local object 'parallel_monitor..monitor'

Traceback (most recent call last): File "", line 1, in File "C:\Users\Vanellope\AppData\Local\Programs\Python\Python37\lib\multiprocessing\spawn.py", line 105, in spawn_main exitcode = _main(fd) File "C:\Users\Vanellope\AppData\Local\Programs\Python\Python37\lib\multiprocessing\spawn.py", line 115, in _main self = reduction.pickle.load(from_parent) EOFError: Ran out of input

lddmonster commented 2 years ago

I meet this two problems too. This article(https://blog.csdn.net/qq_39314099/article/details/83822593) provide a solution for first one, care about the mp_utils.py/parallel_mointor. However second one i have not solved.But, by another way, i close the mointor then i runed the std_test.py and run.py. You can set monitor=None in shapeletsutils.py 98or99 line and time aware_shapeelts.py 285or286 line. Good luck.