-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
[RLlib] Create connectors when calling add_policy #28201
Conversation
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
rllib/evaluation/rollout_worker.py
Outdated
@@ -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: |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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]>
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
…-project#28201) Signed-off-by: ilee300a <[email protected]>
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
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.