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 PPOF new interface support #567

Merged
merged 10 commits into from
Jan 3, 2023
Merged

feature(nyz): add PPOF new interface support #567

merged 10 commits into from
Jan 3, 2023

Conversation

PaParaZz1
Copy link
Member

Description

from ding.bonus import PPOF

agent = PPOF(env='lunarlander_discrete', exp_name='lunarlander_discrete_demo')
agent.train(step=int(1e5))
agent.deploy(enable_save_replay=True)

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 enhancement New feature or request algo Add new algorithm or improve old one labels Jan 2, 2023
# Install

```shell
pip install git+https://github.com/nighood/rocket-recycling@master#egg=rocket_recycling
Copy link
Collaborator

Choose a reason for hiding this comment

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

是否可以把这个修改版的 rocket-recycling 移到 opendilab 下面?

Copy link
Member Author

Choose a reason for hiding this comment

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

这个暂时不用吧,等稳定版

import treetensor.torch as ttorch
from torch.distributions import Normal, Independent


Copy link
Collaborator

Choose a reason for hiding this comment

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

增加 Overview 注释?

deterministic_eval=True,
# model
model=dict(),
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

增加 overview 介绍以及 ppof 与 ppo 的区别,介绍为什么需要单独写一个 ppof.py

ding/policy/common_utils.py Show resolved Hide resolved
ding/bonus/ppof.py Show resolved Hide resolved
task.run()

def deploy(self, ckpt_path: str = None, enable_save_replay: bool = False, debug: bool = False) -> None:
if debug:
Copy link
Collaborator

Choose a reason for hiding this comment

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

deploy 与 batch_evaluate 的异同是?是否可以添加一下注释

'drone_fly',
'hybrid_moving',
]

Copy link
Collaborator

Choose a reason for hiding this comment

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

添加 bonus 路径下的文件说明?简介这里的ppof与policy/下面的ppof的异同?

ding/bonus/ppof.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jan 3, 2023

Codecov Report

Merging #567 (cabd45b) into main (0a25e46) will decrease coverage by 1.13%.
The diff coverage is 33.93%.

❗ Current head cabd45b differs from pull request most recent head 93ddd76. Consider uploading reports for the commit 93ddd76 to get more accurate results

@@            Coverage Diff             @@
##             main     #567      +/-   ##
==========================================
- Coverage   84.59%   83.45%   -1.14%     
==========================================
  Files         555      562       +7     
  Lines       45197    45489     +292     
==========================================
- Hits        38233    37964     -269     
- Misses       6964     7525     +561     
Flag Coverage Δ
unittests 83.45% <33.93%> (-1.14%) ⬇️

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

Impacted Files Coverage Δ
ding/bonus/__init__.py 0.00% <0.00%> (ø)
ding/bonus/config.py 0.00% <0.00%> (ø)
ding/bonus/model.py 0.00% <0.00%> (ø)
ding/bonus/ppof.py 0.00% <0.00%> (ø)
ding/config/__init__.py 100.00% <ø> (ø)
ding/envs/env_manager/subprocess_env_manager.py 74.47% <0.00%> (-1.48%) ⬇️
ding/model/common/__init__.py 100.00% <ø> (ø)
ding/framework/middleware/functional/evaluator.py 42.66% <4.16%> (-10.71%) ⬇️
...ework/middleware/functional/advantage_estimator.py 78.26% <12.50%> (-13.85%) ⬇️
ding/policy/ppof.py 16.47% <16.47%> (ø)
... and 237 more

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

@PaParaZz1 PaParaZz1 merged commit 886285d into main Jan 3, 2023
@PaParaZz1 PaParaZz1 deleted the dev-ppof branch January 3, 2023 12:59
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 enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants