3

I tried to set spawn mode in the beginning of my program by

 torch.multiprocessing.set_start_method('spawn')

But when I ran my program, there came an error about ’ cannot pickle ‘weakref’ object’. And it arose at the place where I tried to start multiprocessing function. I thought maybe because the function or args I sent to multiprocessing can’t be pickled. But how can I solve this problem. Thanks!

  • Does this answer your question? [Python multiprocessing PicklingError: Can't pickle ](https://stackoverflow.com/questions/8804830/python-multiprocessing-picklingerror-cant-pickle-type-function) – HTF Jun 02 '22 at 07:18

0 Answers0