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(zjow): add new pipeline agent sac/ddpg/a2c #637

Merged
merged 274 commits into from
Sep 14, 2023

Conversation

zjowowen
Copy link
Collaborator

@zjowowen zjowowen commented Apr 7, 2023

Add new agent class for sac/ddpg/a2c algorithms.

ding/utils/default_helper.py Show resolved Hide resolved
ding/model/common/utils.py Outdated Show resolved Hide resolved
ding/envs/ding_env_manager.py Outdated Show resolved Hide resolved
@@ -28,6 +28,12 @@ def gae_estimator(cfg: EasyDict, policy: Policy, buffer_: Optional[Buffer] = Non
"""

model = policy.get_attribute('model')
obs_shape = cfg['policy']['model']['obs_shape']
obs_shape = torch.Size(torch.tensor(obs_shape)) if isinstance(obs_shape, list) \
else torch.Size(torch.tensor(obs_shape).unsqueeze(0))
Copy link
Member

Choose a reason for hiding this comment

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

add comments for this

ding/policy/pg.py Outdated Show resolved Hide resolved
@PaParaZz1 PaParaZz1 merged commit a37981e into opendilab:main Sep 14, 2023
15 of 18 checks passed
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.

4 participants