Can we step a Gym environment faster than real time? #79
Answered
by
stephane-caron
stephane-caron
asked this question in
Software
-
I'm training a policy and having the simulation run at 1x the real time is a waste of computing time. Is it possible to step the Gym environment faster than real-time? |
Beta Was this translation helpful? Give feedback.
Answered by
stephane-caron
Apr 10, 2024
Replies: 1 comment
-
Environments are CPU-based by choice (so that they run the same in sim and on the robot), but for training it is possible to step the simulation faster than real-time, provided the CPU is powerful enough for that. There are two sides to it:
These two steps are illustrated in |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
stephane-caron
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environments are CPU-based by choice (so that they run the same in sim and on the robot), but for training it is possible to step the simulation faster than real-time, provided the CPU is powerful enough for that. There are two sides to it:
./tools/bazelisk run -c opt //spines:bullet -- --nb-substeps 5 --spine-frequency 1000
.gym.make("UpkieWheelsEnv-v3", frequency=None)
These two steps are illustrated in
ppo_balancer/train.py
.