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(whl): add PC algorithm #514

Merged
merged 21 commits into from
Mar 9, 2023
Merged

feature(whl): add PC algorithm #514

merged 21 commits into from
Mar 9, 2023

Conversation

kxzxvbk
Copy link
Contributor

@kxzxvbk kxzxvbk commented Oct 14, 2022

Description

Related Issue

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 Oct 14, 2022
@codecov
Copy link

codecov bot commented Oct 14, 2022

Codecov Report

Merging #514 (df00eb5) into main (2c8d02e) will decrease coverage by 0.32%.
The diff coverage is 31.49%.

❗ Current head df00eb5 differs from pull request most recent head 65009b7. Consider uploading reports for the commit 65009b7 to get more accurate results

@@            Coverage Diff             @@
##             main     #514      +/-   ##
==========================================
- Coverage   83.60%   83.28%   -0.32%     
==========================================
  Files         564      566       +2     
  Lines       46237    46600     +363     
==========================================
+ Hits        38658    38813     +155     
- Misses       7579     7787     +208     
Flag Coverage Δ
unittests 83.28% <31.49%> (-0.32%) ⬇️

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

Impacted Files Coverage Δ
ding/entry/serial_entry_pc.py 14.37% <14.37%> (ø)
ding/policy/pc.py 25.00% <25.00%> (ø)
ding/model/template/bc.py 94.23% <66.66%> (-1.77%) ⬇️
ding/model/template/procedure_cloning.py 98.97% <97.14%> (-1.03%) ⬇️
ding/entry/__init__.py 100.00% <100.00%> (ø)
ding/model/template/__init__.py 100.00% <100.00%> (ø)
...ing/model/template/tests/test_procedure_cloning.py 100.00% <100.00%> (ø)
ding/policy/__init__.py 100.00% <100.00%> (ø)
ding/reward_model/rnd_reward_model.py 88.23% <0.00%> (-2.25%) ⬇️
ding/reward_model/icm_reward_model.py 92.66% <0.00%> (-1.65%) ⬇️
... and 17 more

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

maze_pc_main.py Outdated Show resolved Hide resolved
ding/entry/serial_entry_pc.py Outdated Show resolved Hide resolved
ding/model/template/pc.py Outdated Show resolved Hide resolved
ding/entry/serial_entry_pc.py Show resolved Hide resolved
ding/entry/serial_entry_pc.py Show resolved Hide resolved
ding/entry/serial_entry_pc.py Outdated Show resolved Hide resolved
ding/model/template/pc.py Outdated Show resolved Hide resolved
ding/policy/pc.py Outdated Show resolved Hide resolved
ding/policy/pc.py Outdated Show resolved Hide resolved
ding/policy/pc.py Outdated Show resolved Hide resolved
ding/model/template/pc.py Outdated Show resolved Hide resolved
ding/model/template/pc.py Outdated Show resolved Hide resolved
ding/model/template/pc.py Outdated Show resolved Hide resolved
ding/model/template/pc.py Outdated Show resolved Hide resolved
ding/policy/pc.py Show resolved Hide resolved
dizoo/maze/config/maze_bc_config.py Outdated Show resolved Hide resolved
dizoo/maze/config/maze_bc_config.py Show resolved Hide resolved
dizoo/maze/envs/maze_env.py Show resolved Hide resolved


# BFS algorithm
def get_vi_sequence(env, observation):
Copy link
Member

Choose a reason for hiding this comment

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

move this function to ding/utils


train_dataset = DataLoader(train_data, batch_size=batch_size, shuffle=True)
test_dataset = DataLoader(test_data, batch_size=batch_size, shuffle=True)
return train_dataset, test_dataset
Copy link
Member

Choose a reason for hiding this comment

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

move the code related to dataset to ding.utils.data.dataset.py

@PaParaZz1 PaParaZz1 merged commit 7601e03 into opendilab:main Mar 9, 2023
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.

3 participants