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

Implement ContinuousBCQPolicy and offline_bcq example #480

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 32 commits into from
Nov 22, 2021
Merged

Implement ContinuousBCQPolicy and offline_bcq example #480

merged 32 commits into from
Nov 22, 2021

Conversation

thkkk
Copy link
Contributor

@thkkk thkkk commented Nov 18, 2021

  • I have marked all applicable categories:
    • exception-raising fix
    • algorithm implementation fix
    • documentation modification
    • new feature
  • I have reformatted the code using make format (required)
  • I have checked the code using make commit-checks (required)
  • If applicable, I have mentioned the relevant/related issue(s)
  • If applicable, I have listed every items in this Pull Request below

This PR implements ContinuousBCQPolicy, which could be used to train offline agent in the environment of continuous action space. Here is an experimental result in 'halfcheetah-expert-v1', a d4rl environment (for Offline Reinforcement Learning).

image

Example usage is in the examples/offline/offline_bcq.py.

@Trinkle23897
Copy link
Collaborator

Could you please add test/continuous/bcq.py for BCQ unit test?

@codecov-commenter
Copy link

codecov-commenter commented Nov 18, 2021

Codecov Report

Merging #480 (aa884a6) into master (94d3b27) will increase coverage by 0.17%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #480      +/-   ##
==========================================
+ Coverage   94.06%   94.24%   +0.17%     
==========================================
  Files          60       61       +1     
  Lines        3910     4031     +121     
==========================================
+ Hits         3678     3799     +121     
  Misses        232      232              
Flag Coverage Δ
unittests 94.24% <100.00%> (+0.17%) ⬆️

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

Impacted Files Coverage Δ
tianshou/policy/__init__.py 100.00% <100.00%> (ø)
tianshou/policy/imitation/bcq.py 100.00% <100.00%> (ø)
tianshou/utils/net/continuous.py 96.52% <100.00%> (+1.03%) ⬆️

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 94d3b27...aa884a6. Read the comment docs.

Copy link
Contributor Author

@thkkk thkkk left a comment

Choose a reason for hiding this comment

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

finish test_bcq

Trinkle23897
Trinkle23897 previously approved these changes Nov 22, 2021
@Trinkle23897 Trinkle23897 merged commit 5c5a3db into thu-ml:master Nov 22, 2021
BFAnas pushed a commit to BFAnas/tianshou that referenced this pull request May 5, 2024
This PR implements BCQPolicy, which could be used to train an offline agent in the environment of continuous action space. An experimental result 'halfcheetah-expert-v1' is provided, which is a d4rl environment (for Offline Reinforcement Learning).
Example usage is in the examples/offline/offline_bcq.py.
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.

3 participants