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

add policy.update to enable post process and remove collector.sample #180

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 11 commits into from
Aug 15, 2020

Conversation

youkaichao
Copy link
Collaborator

In reply to this comment.

@codecov-commenter
Copy link

codecov-commenter commented Aug 6, 2020

Codecov Report

Merging #180 into dev will increase coverage by 0.39%.
The diff coverage is 88.23%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #180      +/-   ##
==========================================
+ Coverage   88.74%   89.14%   +0.39%     
==========================================
  Files          39       39              
  Lines        2399     2404       +5     
==========================================
+ Hits         2129     2143      +14     
+ Misses        270      261       -9     
Flag Coverage Δ
#unittests 89.14% <88.23%> (+0.39%) ⬆️

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

Impacted Files Coverage Δ
tianshou/data/collector.py 90.96% <0.00%> (-2.94%) ⬇️
tianshou/policy/base.py 95.83% <100.00%> (+0.44%) ⬆️
tianshou/policy/modelfree/ddpg.py 98.71% <100.00%> (+1.24%) ⬆️
tianshou/policy/modelfree/dqn.py 97.46% <100.00%> (-0.04%) ⬇️
tianshou/policy/modelfree/sac.py 86.31% <100.00%> (+0.89%) ⬆️
tianshou/policy/modelfree/td3.py 100.00% <100.00%> (+1.40%) ⬆️
tianshou/trainer/offpolicy.py 100.00% <100.00%> (ø)
tianshou/trainer/onpolicy.py 94.02% <100.00%> (+16.41%) ⬆️

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 140b1c2...71ef846. Read the comment docs.

@youkaichao youkaichao changed the title WIP: add policy.update to enable post process and remove collector.sample WIP: add collector.update_policy to enable post process and remove collector.sample Aug 6, 2020
@youkaichao youkaichao changed the title WIP: add collector.update_policy to enable post process and remove collector.sample WIP: add policy.update to enable post process and remove collector.sample Aug 6, 2020
@youkaichao youkaichao requested a review from duburcqa August 11, 2020 02:42
@youkaichao
Copy link
Collaborator Author

This PR is much simpler. Have a look when you are available! @Trinkle23897 @duburcqa

@Trinkle23897
Copy link
Collaborator

Trinkle23897 commented Aug 11, 2020

The following code snippets should be changed since collector.sample has been removed:

$ grep collector.sample * -r
docs/tutorials/dqn.rst:        losses = policy.learn(train_collector.sample(batch_size=64))
docs/tutorials/concepts.rst:            b_s, b_a, b_s_, b_r, b_d = buffer.get(size=64)          # collector.sample(batch_size)
README.md:result = policy.learn(collector.sample(batch_size))

duburcqa
duburcqa previously approved these changes Aug 11, 2020
@Trinkle23897 Trinkle23897 changed the title WIP: add policy.update to enable post process and remove collector.sample add policy.update to enable post process and remove collector.sample Aug 11, 2020
@duburcqa
Copy link
Collaborator

How do you do suggestions ?? That's a nice feature 👍

@Trinkle23897
Copy link
Collaborator

How do you do suggestions ?? That's a nice feature

2020-08-12 07-33-17 的屏幕截图

Trinkle23897
Trinkle23897 previously approved these changes Aug 11, 2020
@Trinkle23897 Trinkle23897 requested a review from duburcqa August 12, 2020 23:58
@Trinkle23897 Trinkle23897 merged commit 7f3b817 into thu-ml:dev Aug 15, 2020
@youkaichao youkaichao deleted the policy.update branch August 15, 2020 10:46
BFAnas pushed a commit to BFAnas/tianshou that referenced this pull request May 5, 2024
…hu-ml#180)

* add policy.update to enable post process and remove collector.sample

* update doc in policy concept

* remove collector.sample in doc

* doc update of concepts

* docs

* polish

* polish policy

* remove collector.sample in docs

* minor fix

* Apply suggestions from code review

just a test

* doc fix

Co-authored-by: Trinkle23897 <463003665@qq.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
Development

Successfully merging this pull request may close these issues.

4 participants