StanfordVL / iGibson

A Simulation Environment to train Robots in Large Realistic Interactive Scenes
http://svl.stanford.edu/igibson
MIT License
659 stars 159 forks source link

DRL training with vectorized environment and asynchronous time-steps #349

Closed akmandor closed 10 months ago

akmandor commented 10 months ago

Background: I am trying to implement a similar architecture in this work: ReLMoGen.

Issue description: When parallelized (=vectorized), it seems like, agents wait each other until both complete each action.

Question: Is there any way that I can set the training pipeline, using iGibson (Pybullet) and Stable-Baselines3, to enable asynchronous time steps? I would really appreciate if you can guide me on this issue or suggesting other alternatives to implement this architecture.

ChengshuLi commented 10 months ago

@akmandor You are right that for parallelized environments, as it's implemented in sb3, it's bottlenecked by the slowest environment. It's typically not an issue if all environment steps take approximately the same amount of time (hence there is no real bottleneck). Some other RL packages (non-stable baselines 3) might provide such functionality but I am not entirely sure. Since this is not technically an issue with iGibson but rather RL framework parallelization, I will close the issue for now. Feel free to re-open if you need additional help! Thanks!

akmandor commented 10 months ago

Thank you so much for clarifying the issue for me. I might take a look to other available RL libraries, such as RAY's RL-Lib to solve that training bottleneck.