Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature(zlx): add envpool #228

Merged
merged 16 commits into from
Mar 17, 2022
Merged

feature(zlx): add envpool #228

merged 16 commits into from
Mar 17, 2022

Conversation

LuciusMos
Copy link
Collaborator

Description

Related Issue

TODO

Check List

  • merge the latest version source branch/repo, and resolve all the conflicts
  • pass style check
  • pass all the tests

@LuciusMos LuciusMos added efficiency optimization Efficiency optimization (time, memory and so on) env Questions about RL environment labels Feb 25, 2022
@codecov
Copy link

codecov bot commented Feb 25, 2022

Codecov Report

Merging #228 (f818506) into main (c02d048) will decrease coverage by 0.12%.
The diff coverage is 41.41%.

❗ Current head f818506 differs from pull request most recent head 4ac47f5. Consider uploading reports for the commit 4ac47f5 to get more accurate results

@@            Coverage Diff             @@
##             main     #228      +/-   ##
==========================================
- Coverage   86.07%   85.95%   -0.13%     
==========================================
  Files         464      466       +2     
  Lines       35872    35923      +51     
==========================================
- Hits        30878    30876       -2     
- Misses       4994     5047      +53     
Flag Coverage Δ
unittests 85.95% <41.41%> (-0.13%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
ding/envs/env_manager/__init__.py 100.00% <ø> (ø)
...envs/env_manager/tests/test_envpool_env_manager.py 35.71% <35.71%> (ø)
ding/envs/env_manager/envpool_env_manager.py 42.85% <42.85%> (ø)
ding/worker/collector/base_serial_collector.py 90.90% <100.00%> (ø)
ding/worker/collector/marine_parallel_collector.py 89.86% <0.00%> (-1.39%) ⬇️
ding/worker/learner/comm/flask_fs_learner.py 90.62% <0.00%> (-0.63%) ⬇️
ding/entry/serial_entry_sqil.py 92.59% <0.00%> (ø)
ding/model/common/tests/test_head.py 100.00% <0.00%> (ø)
ding/model/common/head.py 100.00% <0.00%> (+0.96%) ⬆️
ding/utils/data/dataloader.py 47.15% <0.00%> (+1.03%) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c02d048...4ac47f5. Read the comment docs.

@PaParaZz1 PaParaZz1 changed the title feature(zlx): envpool feature(zlx): add envpool Mar 15, 2022
@@ -0,0 +1,151 @@
import os
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merge envpool_dqn_main.py into atari_dqn_main.py, use different config options to control which env manager is used.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Preserve pong_dqn_envpool_main because envpool env manager is slightly different from others.

dizoo/atari/entry/envpool_dqn_main.py Outdated Show resolved Hide resolved
dizoo/atari/entry/envpool_dqn_main.py Outdated Show resolved Hide resolved
dizoo/atari/entry/envpool_dqn_main.py Outdated Show resolved Hide resolved
dizoo/atari/entry/envpool_dqn_main.py Outdated Show resolved Hide resolved
dizoo/atari/entry/envpool_dqn_main.py Outdated Show resolved Hide resolved
dizoo/atari/entry/envpool_dqn_main.py Outdated Show resolved Hide resolved
dizoo/atari/entry/envpool_dqn_main.py Outdated Show resolved Hide resolved
dizoo/atari/entry/envpool_dqn_main.py Outdated Show resolved Hide resolved
dizoo/atari/entry/envpool_dqn_main.py Outdated Show resolved Hide resolved
@LuciusMos LuciusMos force-pushed the dev-envpool branch 2 times, most recently from 03a9f62 to d75fe87 Compare March 17, 2022 02:53
@LuciusMos LuciusMos force-pushed the dev-envpool branch 3 times, most recently from 223624b to 7a8e3ae Compare March 17, 2022 07:05
…anager, reset returns until all envs are reset successfully
@PaParaZz1 PaParaZz1 merged commit 8a108c7 into main Mar 17, 2022
@PaParaZz1 PaParaZz1 deleted the dev-envpool branch March 17, 2022 13:19
puyuan1996 pushed a commit to puyuan1996/DI-engine that referenced this pull request Apr 18, 2022
* feature(nyz): init envpool(ci skip)

* feature(nyz): add naive envpool atari demo

* fix(nyz): fix typo and unused import

* feature(zlx): Modify envpool config

* fixbug(zlx): Fix comments by nyz

* fixbug(zlx): add unittest for envpool env manager

* style(zlx)

* fixbug(zlx): Add runtime installation of envpool

* fixbug(zlx): Add pip install envpool in github unittest workflows

* fixbug(zlx): Add pip install envpool in github unittest workflows

* test(zlx): Seperate envpool test out of unit/platform test

* fixbug(zlx): Withdraw changes in sample serial collector; In PoolEnvManager, reset returns until all envs are reset successfully

Co-authored-by: niuyazhe <niuyazhe@sensetime.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
efficiency optimization Efficiency optimization (time, memory and so on) env Questions about RL environment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants