I think using spawn
method in notebook is not supported in PyTorch. We have tracked one of the issues here but currently, there is no progress on that. Beside torch.multiprocessing.set_start_method
, there are several other problems with MCMC multi-chains:
- behavior in linux is different from the behavior in mac
- sometime we need to change the sharing strategy using
torch.multiprocessing.set_sharing_strategy
- in some systems, running multi-chains in CPU get stuck if pytorch gpu version is installed
I haven’t kept up with the current progress of multiprocessing in PyTorch so hopefully, those issues can be resolved with a few of changes. We appreciate any help to make multi-chain MCMC works seemlessly, across windows/linux/mac, cpu/gpu, script/notebook. Currently, we have problems for each of those environments.