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] Incorporate VectorEncoder into PPORLModule and tests #31238

Conversation

ArturNiederfahrenhorst
Copy link
Contributor

Why are these changes needed?

This PR matches @smorad 's VectorEncoder to the current PPORLModule code.

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 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 :(

Signed-off-by: Artur Niederfahrenhorst <artur@anyscale.com>
Signed-off-by: Artur Niederfahrenhorst <artur@anyscale.com>
Signed-off-by: Artur Niederfahrenhorst <artur@anyscale.com>
Signed-off-by: Artur Niederfahrenhorst <artur@anyscale.com>
Signed-off-by: Artur Niederfahrenhorst <artur@anyscale.com>
Signed-off-by: Artur Niederfahrenhorst <artur@anyscale.com>
Signed-off-by: Artur Niederfahrenhorst <artur@anyscale.com>
Signed-off-by: Artur Niederfahrenhorst <artur@anyscale.com>
Signed-off-by: Artur Niederfahrenhorst <artur@anyscale.com>
Comment on lines +60 to +61
pi_encoder_config: ModelConfig = None
vf_encoder_config: ModelConfig = None
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Maybe these should be EncoderConfig?

hidden_layers=self.config.pi_config.hidden_layers,
activation=self.config.pi_config.activation,
obs_spec = ModelSpec(
{ # bxt is just a name for better readability to indicated padded batch
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

input_spec=obs_spec
)
self.pi_encoder = self.config.pi_encoder_config.build(
self.shared_encoder.output_spec
Copy link
Contributor

Choose a reason for hiding this comment

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

You might want to call spec.filter here, not sure.

@@ -13,6 +13,9 @@

# TODO (Kourosh): Find a better / more straight fwd approach for sub-components

ENCODER_OUT = "embedding"
STATE_IN = "state_in"
Copy link
Contributor

Choose a reason for hiding this comment

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

state is super overloaded. Is it possible to call these recurrent_state or something?

@ArturNiederfahrenhorst ArturNiederfahrenhorst changed the title [RLlib] Incordporate VectorEncoder [RLlib] Incorporate VectorEncoder Dec 20, 2022
@ArturNiederfahrenhorst ArturNiederfahrenhorst changed the title [RLlib] Incorporate VectorEncoder [RLlib] Incorporate VectorEncoder into PPORLModule and tests Dec 20, 2022
Signed-off-by: Artur Niederfahrenhorst <artur@anyscale.com>
Signed-off-by: Artur Niederfahrenhorst <artur@anyscale.com>
Signed-off-by: Artur Niederfahrenhorst <artur@anyscale.com>
Signed-off-by: Artur Niederfahrenhorst <artur@anyscale.com>
Signed-off-by: Artur Niederfahrenhorst <artur@anyscale.com>
Signed-off-by: Artur Niederfahrenhorst <artur@anyscale.com>
@stale
Copy link

stale bot commented Jan 20, 2023

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

  • If you'd like to keep this open, just leave any comment, and the stale label will be removed.

@stale stale bot added the stale The issue is stale. It will be closed within 7 days unless there are further conversation label Jan 20, 2023
@ArturNiederfahrenhorst
Copy link
Contributor Author

Closing in favour of #31469

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale The issue is stale. It will be closed within 7 days unless there are further conversation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants