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(cy): add dreamerV3 + MiniGrid code #725

Merged
merged 12 commits into from
Feb 1, 2024

Conversation

Cloud-Pku
Copy link
Collaborator

Check List

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

@Cloud-Pku Cloud-Pku added the algo Add new algorithm or improve old one label Sep 15, 2023
ding/policy/mbpolicy/dreamer.py Outdated Show resolved Hide resolved
@@ -247,11 +248,16 @@ def _forward_collect(self, data: dict, world_model, envstep, reset=None, state=N
action = action.detach()

state = (latent, action)
if world_model.action_type == 'discrete':
Copy link
Member

Choose a reason for hiding this comment

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

add an assertion at the first occurrence of this string comparison

ding/policy/mbpolicy/dreamer.py Show resolved Hide resolved
ding/world_model/dreamer.py Outdated Show resolved Hide resolved
dizoo/minigrid/config/minigrid_dreamer_config.py Outdated Show resolved Hide resolved
ding/world_model/dreamer.py Show resolved Hide resolved
ding/world_model/dreamer.py Show resolved Hide resolved
ding/policy/mbpolicy/dreamer.py Show resolved Hide resolved
self.embed_size = (
(self.state_size[1] // 2 ** (len(self._cfg.encoder_kernels))) ** 2 * self._cfg.cnn_depth *
2 ** (len(self._cfg.encoder_kernels) - 1)
)
Copy link
Member

Choose a reason for hiding this comment

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

add else branch for better error hints

ding/world_model/dreamer.py Outdated Show resolved Hide resolved
@PaParaZz1 PaParaZz1 merged commit 2405639 into opendilab:main Feb 1, 2024
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants