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

fix critical bugs in MAPolicy and docs update #207

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 6 commits into from
Sep 8, 2020
Merged

fix critical bugs in MAPolicy and docs update #207

merged 6 commits into from
Sep 8, 2020

Conversation

Trinkle23897
Copy link
Collaborator

@Trinkle23897 Trinkle23897 commented Sep 6, 2020

cherry-pick from #200

  • fix a bug in MAPolicy: buffer.rew = Batch() doesn't change buffer.rew (thanks mypy)
  • polish examples/box2d/bipedal_hardcore_sac.py
  • several docs update
  • format setup.py and bump version to 0.2.7

@codecov-commenter
Copy link

codecov-commenter commented Sep 6, 2020

Codecov Report

Merging #207 into master will decrease coverage by 0.49%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #207      +/-   ##
==========================================
- Coverage   94.09%   93.60%   -0.50%     
==========================================
  Files          40       40              
  Lines        2457     2454       -3     
==========================================
- Hits         2312     2297      -15     
- Misses        145      157      +12     
Flag Coverage Δ
#unittests 93.60% <100.00%> (-0.50%) ⬇️

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

Impacted Files Coverage Δ
tianshou/policy/imitation/base.py 100.00% <ø> (ø)
tianshou/policy/multiagent/mapolicy.py 93.75% <100.00%> (ø)
tianshou/trainer/onpolicy.py 77.61% <0.00%> (-17.92%) ⬇️
tianshou/env/worker/subproc.py 91.09% <0.00%> (-0.07%) ⬇️
tianshou/data/collector.py 91.44% <0.00%> (-0.05%) ⬇️
tianshou/data/buffer.py 98.98% <0.00%> (-0.01%) ⬇️

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 380e9e9...96a2cc8. Read the comment docs.

@Trinkle23897 Trinkle23897 linked an issue Sep 8, 2020 that may be closed by this pull request
8 tasks
save_rew, buffer.rew = buffer.rew, Batch()
# Since we do not override buffer.__setattr__, here we use _meta to
# change buffer.rew, otherwise buffer.rew = Batch() has no effect.
save_rew, buffer._meta.rew = buffer.rew, Batch()
Copy link
Collaborator

Choose a reason for hiding this comment

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

It would be nice to find a way to avoid such trick in future release because it is error prone.

@Trinkle23897 Trinkle23897 merged commit 64af7ea into thu-ml:master Sep 8, 2020
@Trinkle23897 Trinkle23897 deleted the fix-mapolicy branch September 8, 2020 13:10
BFAnas pushed a commit to BFAnas/tianshou that referenced this pull request May 5, 2024
- fix a bug in MAPolicy: `buffer.rew = Batch()` doesn't change `buffer.rew` (thanks mypy)
- polish examples/box2d/bipedal_hardcore_sac.py
- several docs update
- format setup.py and bump version to 0.2.7
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.

How to support multi-agent reinforcement learning
3 participants