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

Implement CQLPolicy and offline_cql example #506

Merged
merged 21 commits into from
Jan 15, 2022
Merged

Implement CQLPolicy and offline_cql example #506

merged 21 commits into from
Jan 15, 2022

Conversation

thkkk
Copy link
Contributor

@thkkk thkkk commented Jan 15, 2022

  • 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 CQLPolicy, which could be used to train an offline agent in the environment of continuous action space. An experimental result 'halfcheetah-medium-v1' is provided, which is a d4rl environment (for Offline Reinforcement Learning).
rew

Example usage is in the examples/offline/offline_bcq.py. Document modification and unit test for CQLPolicy are also completed.

@codecov-commenter
Copy link

codecov-commenter commented Jan 15, 2022

Codecov Report

Merging #506 (e855038) into master (a59d96d) will increase coverage by 0.24%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #506      +/-   ##
==========================================
+ Coverage   94.18%   94.42%   +0.24%     
==========================================
  Files          62       63       +1     
  Lines        4127     4252     +125     
==========================================
+ Hits         3887     4015     +128     
+ Misses        240      237       -3     
Flag Coverage Δ
unittests 94.42% <100.00%> (+0.24%) ⬆️

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/cql.py 100.00% <100.00%> (ø)
tianshou/policy/modelfree/sac.py 100.00% <0.00%> (+1.17%) ⬆️
tianshou/utils/net/continuous.py 97.91% <0.00%> (+1.38%) ⬆️

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 a59d96d...e855038. Read the comment docs.

@Trinkle23897 Trinkle23897 merged commit bc53ead into thu-ml:master Jan 15, 2022
BFAnas pushed a commit to BFAnas/tianshou that referenced this pull request May 5, 2024
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