ElegantRL
ElegantRL copied to clipboard
The method how to use Vectorized Env in ElegantRL
Firstly, thanks for your excellent work. Recently, I plan to apply ElegantRL in my research work, and I'm trying to accelerate training and sampling process with SubprocVecEnv in Stable Baselines 3. However, I didn't find any doc and example about it in ElegantRL tutorial. So is it possible to combine ElegantRL with SubprocVecEnv and how to do it?
I'll write down some short answers and then wait until tonight to refine.
Stable Baselines 3 SubprocVecEnv is a vectorized environment. Isaac Gym is a vectorized environment too.
We had vectorized environment demo in demo_Isaac_Gym.py
https://github.com/AI4Finance-Foundation/ElegantRL/blob/1fadb93eebb7abcfff76679636c9bb0b12170ca4/examples/demo_Isaac_Gym.py#L17
To use SB3's VecEnv feature, we can start by changing Isaac Gym's VecEnv demo code.
https://github.com/AI4Finance-Foundation/ElegantRL/blob/1fadb93eebb7abcfff76679636c9bb0b12170ca4/elegantrl/agents/AgentBase.py#L73-L76