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

[RLlib] DreamerV3: Catalog enhancements 05 - GRU default model support #34284

Merged

Conversation

sven1977
Copy link
Contributor

@sven1977 sven1977 commented Apr 11, 2023

DreamerV3: Catalog enhancements 05 - GRU default model support

  • Generalize LSTM- and GRU-based encoders into one single config (RecurrentEncoderConfig) for simplicity.
  • Both can be layer-stacked with state=(num_layers, B, [hidden state dim]).
  • GRU encoders have the same architecture and compute-behavior between tf2 and torch (confirmed with test cases).

Why are these changes needed?

Related issue number

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

sven1977 and others added 30 commits March 28, 2023 16:42
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Co-authored-by: kourosh hakhamaneshi <[email protected]>
Signed-off-by: Sven Mika <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
…el_conflict' into dreamer_v3_catalog_enhancements_01

Signed-off-by: sven1977 <[email protected]>

# Conflicts:
#	rllib/BUILD
#	rllib/core/models/base.py
#	rllib/core/models/specs/tests/test_tensor_spec.py
#	rllib/core/models/tf/encoder.py
#	rllib/core/models/tf/mlp.py
#	rllib/core/models/tf/primitives.py
#	rllib/core/models/torch/mlp.py
#	rllib/models/utils.py
Signed-off-by: sven1977 <[email protected]>
…l_spec_rename_to_specs_plural_to_avoid_tf_keras_model_conflict
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
…el_conflict' into dreamer_v3_catalog_enhancements_01
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
…mer_v3_catalog_enhancements_02_deconv2d

Signed-off-by: sven1977 <[email protected]>

# Conflicts:
#	rllib/BUILD
#	rllib/core/models/specs/tests/test_tensor_spec.py
#	rllib/core/models/tf/encoder.py
#	rllib/core/models/tf/mlp.py
#	rllib/core/models/tf/primitives.py
#	rllib/core/models/torch/mlp.py
#	rllib/models/utils.py
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
@sven1977 sven1977 removed the do-not-merge Do not merge this PR! label Apr 16, 2023
@sven1977 sven1977 changed the title [WIP; RLlib] DreamerV3: Catalog enhancements 05 - GRU default model support [RLlib] DreamerV3: Catalog enhancements 05 - GRU default model support Apr 17, 2023
Copy link
Contributor

@ArturNiederfahrenhorst ArturNiederfahrenhorst left a comment

Choose a reason for hiding this comment

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

The PR looks super cool.
test_recurrent_encoders is currently failing.
So after that, I say we can merge 👍

Signed-off-by: sven1977 <[email protected]>
@sven1977
Copy link
Contributor Author

Thanks for the review @ArturNiederfahrenhorst , fixed the test and waiting for all to pass now ...

@sven1977 sven1977 merged commit 512b319 into ray-project:master Apr 18, 2023
elliottower pushed a commit to elliottower/ray that referenced this pull request Apr 22, 2023
ProjectsByJackHe pushed a commit to ProjectsByJackHe/ray that referenced this pull request May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants