Closed bhancock8 closed 5 years ago
Not a big deal. I'll figure this out internally.
For posterity, the solution is to add --no-cuda
to the call. Hogwild requires cpu-only for the moment.
yeah basically pytorch requires the start method to be changed and you have to carefully control where this happens, for example by adding to the front of examples/train_model.py:
if __name__ == '__main__':
import torch
from torch import multiprocessing
multiprocessing.set_start_method('spawn')
that's worked in the past, although now there's a bug that I don't understand why this would get flagged:
raise RuntimeError("Cannot pickle CUDA storage; try pickling a CUDA tensor instead")
However, the other start methods can be extremely slow, so I wouldn't necessary want to do cuda multithreaded anyways.
I'm having trouble using a TorchAgent with HogwildWorld. It looks to me like the HogwildWorld is used when --numthreads > 1, but adding "--numthreads 2" to the example command on the main repo README:
yields the following error: