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

feature(nyz): add policy gradient algo implementation #544

Merged
merged 5 commits into from
Nov 24, 2022
Merged

Conversation

PaParaZz1
Copy link
Member

@PaParaZz1 PaParaZz1 commented Nov 16, 2022

Description

add policy gradient (REINFORCE) algo

LunarLander result:
Screen Shot 2022-11-22 at 10 19 06 PM

Related Issue

#517

TODO

Check List

  • merge the latest version source branch/repo, and resolve all the conflicts
  • pass style check
  • pass all the tests

@PaParaZz1 PaParaZz1 added the algo Add new algorithm or improve old one label Nov 16, 2022
@codecov
Copy link

codecov bot commented Nov 16, 2022

Codecov Report

Merging #544 (db3290a) into main (756b912) will increase coverage by 0.26%.
The diff coverage is 88.00%.

❗ Current head db3290a differs from pull request most recent head 4aecd40. Consider uploading reports for the commit 4aecd40 to get more accurate results

@@            Coverage Diff             @@
##             main     #544      +/-   ##
==========================================
+ Coverage   85.33%   85.60%   +0.26%     
==========================================
  Files         529      532       +3     
  Lines       43543    44442     +899     
==========================================
+ Hits        37157    38043     +886     
- Misses       6386     6399      +13     
Flag Coverage Δ
unittests 85.60% <88.00%> (+0.26%) ⬆️

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

Impacted Files Coverage Δ
ding/model/common/__init__.py 100.00% <ø> (ø)
ding/torch_utils/data_helper.py 76.69% <0.00%> (-0.66%) ⬇️
ding/policy/base_policy.py 74.01% <33.33%> (-0.43%) ⬇️
ding/model/common/head.py 98.43% <71.42%> (-0.77%) ⬇️
ding/entry/tests/test_serial_entry_onpolicy.py 81.81% <77.77%> (-0.54%) ⬇️
ding/policy/pg.py 88.88% <88.88%> (ø)
ding/model/template/tests/test_pg.py 90.90% <90.90%> (ø)
ding/model/template/pg.py 94.11% <94.11%> (ø)
ding/config/config.py 83.90% <100.00%> (+0.05%) ⬆️
ding/model/template/__init__.py 100.00% <100.00%> (ø)
... and 20 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

ding/policy/pg.py Show resolved Hide resolved
README.md Show resolved Hide resolved
@PaParaZz1 PaParaZz1 merged commit 4c607d4 into main Nov 24, 2022
@PaParaZz1 PaParaZz1 deleted the dev-pg branch November 24, 2022 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
algo Add new algorithm or improve old one
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants