这是indexloc提供的服务,不要输入任何密码
Skip to content

Step collector implementation #280

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

Merged
merged 122 commits into from
Feb 19, 2021
Merged

Conversation

ChenDRAG
Copy link
Collaborator

@ChenDRAG ChenDRAG commented Jan 28, 2021

This is the third commit of 6 commits mentioned in #274, which features refactor of Collector to fix #245. You can check #274 for more detail.

@codecov-io
Copy link

codecov-io commented Feb 18, 2021

Codecov Report

Merging #280 (9b46678) into dev (d918022) will decrease coverage by 0.16%.
The diff coverage is 93.67%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #280      +/-   ##
==========================================
- Coverage   94.64%   94.47%   -0.17%     
==========================================
  Files          45       45              
  Lines        3027     3152     +125     
==========================================
+ Hits         2865     2978     +113     
- Misses        162      174      +12     
Flag Coverage Δ
unittests 94.47% <93.67%> (-0.17%) ⬇️

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

Impacted Files Coverage Δ
tianshou/policy/modelfree/a2c.py 86.20% <ø> (ø)
tianshou/policy/modelfree/pg.py 97.36% <ø> (ø)
tianshou/policy/modelfree/ppo.py 96.51% <ø> (ø)
tianshou/policy/base.py 76.80% <67.39%> (+3.27%) ⬆️
tianshou/trainer/onpolicy.py 96.87% <90.90%> (-1.54%) ⬇️
tianshou/data/collector.py 94.46% <94.11%> (-1.54%) ⬇️
tianshou/data/buffer.py 98.57% <97.12%> (-1.43%) ⬇️
tianshou/data/__init__.py 100.00% <100.00%> (ø)
tianshou/data/batch.py 99.74% <100.00%> (+0.51%) ⬆️
tianshou/policy/__init__.py 100.00% <100.00%> (ø)
... and 12 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 d918022...9b46678. Read the comment docs.

@ChenDRAG
Copy link
Collaborator Author

I think this pr is ready to merge now.

@Trinkle23897
Copy link
Collaborator

Other suggestings will appear in the next PR because this is too large (over 2000+ lines, though lots of changes are from the test).

@Trinkle23897 Trinkle23897 merged commit 150d0ec into thu-ml:dev Feb 19, 2021
@ChenDRAG ChenDRAG mentioned this pull request Mar 6, 2021
8 tasks
@Trinkle23897 Trinkle23897 linked an issue Apr 21, 2021 that may be closed by this pull request
BFAnas pushed a commit to BFAnas/tianshou that referenced this pull request May 5, 2024
This is the third PR of 6 commits mentioned in thu-ml#274, which features refactor of Collector to fix thu-ml#245. You can check thu-ml#274 for more detail.

Things changed in this PR:

1. refactor collector to be more cleaner, split AsyncCollector to support asyncvenv;
2. change buffer.add api to add(batch, bffer_ids); add several types of buffer (VectorReplayBuffer, PrioritizedVectorReplayBuffer, etc.)
3. add policy.exploration_noise(act, batch) -> act
4. small change in BasePolicy.compute_*_returns
5. move reward_metric from collector to trainer
6. fix np.asanyarray issue (different version's numpy will result in different output)
7. flake8 maxlength=88
8. polish docs and fix test

Co-authored-by: n+e <trinkle23897@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants