I am trying to implement A3C using torch’s multiprocessing module.
It has three major parts - environment, agent and model.
I have one common environment which processes huge chunk of data in it’s init and stores it in self this variable is a custom object. I want all the agents (child processes) to share this custom environment but when I do that the RAM usage gradually keeps on increasing. This is probably because agents are creating copies of the environment. The environment is read-only so I don’t see any need for them to copy it.
Also as suggested here - https://github.com/pytorch/pytorch/issues/13246 9 I tried changing all the lists in my environment to Numpy arrays but to no avail.
Feel free to ask if I have missed anything.