-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Description Improved speedup in gym by: - added `max_episode_steps` into the base config in c++ - moved `max_episode_steps` from c++ default config per env into `registration.py` - moved `trunc` computation logics from python to c++ This PR also includes a big refactor of calling test env. We use `make_dm` / `make_gym` instead of `envpool_cls(spec_cls(spec_cls.gen_config(...)))`. ## Motivation and Context The computation of `trunc` in `gym_envpool.py` is shown as a bottleneck by `py-spy`. After fix, envpool's speedup in gym improved from ~1.0x to ~1.3x (using make_gym instead of make_dm for the test below): ``` Namespace(domain='cheetah', seed=0, task='run', total_step=200000) 100%|███████████████████████████████████████████████████████████████████████████████████████████████| 200000/200000 [00:17<00:00, 11301.86it/s] FPS(dmc) = 11300.15 100%|███████████████████████████████████████████████████████████████████████████████████████████████| 200000/200000 [00:13<00:00, 14408.97it/s] FPS(envpool) = 14408.43 EnvPool Speedup: 1.28x ``` Co-authored-by: Jiayi Weng <trinkle23897@gmail.com>
- Loading branch information
1 parent
e384d09
commit 29d8412
Showing
74 changed files
with
597 additions
and
1,012 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.