sergiyayf / PhysiLearning

Reinforcement Learning repo for PhysiCell adaptive therapy
0 stars 0 forks source link

implement the use of multiprocessing for training on multiple envs #17

Closed sergiyayf closed 1 year ago

sergiyayf commented 1 year ago
sergiyayf commented 1 year ago

I run a small simulation with 2 environment for few steps to see if multiprocessing speeds up training, and it looked like it does. But then I run one with 10 environments overnight, and at the end the number of steps was the same if run on 1 env. PhysiCell simulation steps increased almost by 10.

ToDo:

sergiyayf commented 1 year ago

With GridEnv, using all of the cores for the job -> using SubprocVecEnv with 4 frames to stack -> double the speed. Probably, because you get speed up of running single env on multiple cores. and then for 10 ones, they have less resources per environment