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] Create connectors when calling add_policy #28201

Merged

Conversation

ArturNiederfahrenhorst
Copy link
Contributor

Signed-off-by: Artur Niederfahrenhorst [email protected]

Why are these changes needed?

Currently, connectors are not added when manually adding a policy to a rollout worker after worker initialization.

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 <[email protected]>
@@ -1252,6 +1252,9 @@ def add_policy(

self.filters[policy_id] = get_filter(self.observation_filter, filter_shape)

if self.policy_config.get("enable_connectors") and policy_id in self.policy_map:
Copy link
Member

Choose a reason for hiding this comment

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

can you check if self.policy_map[policy_id] already has connectors configured?
when you restore a connector-enabled policy, existing connector state is part of the policy state, so it should be restore already, and we don't need to create things from fresh here.
and I think the logic right now is that you can't really restore non-connector policies for a connector-enabled stack.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Copy link
Member

@gjoliver gjoliver left a comment

Choose a reason for hiding this comment

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

Thanks.

@sven1977 sven1977 merged commit b61a473 into ray-project:master Sep 8, 2022
ilee300a pushed a commit to ilee300a/ray that referenced this pull request Sep 12, 2022
@ArturNiederfahrenhorst ArturNiederfahrenhorst deleted the connectorsinaddpolicy branch September 21, 2022 10:22
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.

3 participants