kiddyboots216 / CommEfficient

PyTorch for benchmarking communication-efficient distributed SGD optimization algorithms
71 stars 20 forks source link

Can't pickle <function compute_loss_train at 0x7fbc72bf4dc0> #15

Closed xiayuanj closed 1 year ago

xiayuanj commented 1 year ago

Hi, I'm having a new problem reproducing that code,could you please help me to fix it? Thanks a lot! image image

kiddyboots216 commented 1 year ago

You actually can't run multiprocessing using the 'run' button in any IDE. The reason why is because that run button will wrap the script and call something other than main, whereas the multiprocessing needs to call something like __mp_main__.

In order to run the script with multiprocessing you would have to run it from terminal.

xiayuanj commented 1 year ago

You actually can't run multiprocessing using the 'run' button in any IDE. The reason why is because that run button will wrap the script and call something other than main, whereas the multiprocessing needs to call something like mp_main.

In order to run the script with multiprocessing you would have to run it from terminal.

Thanks a lot for your reply, it's very helpful for me.