-
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] Fix RolloutWorker filter syncing #30257
[RLlib] Fix RolloutWorker filter syncing #30257
Conversation
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
@@ -144,7 +144,7 @@ def maybe_get_filters_for_syncing(rollout_worker, policy_id): | |||
] | |||
# There can only be one filter at a time | |||
if filter_connectors: | |||
assert len(SyncedFilterAgentConnector) == 1, ( |
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.
This line was never executed
@@ -445,7 +445,11 @@ def __getitem__(self, key: Union[str, int, type]): | |||
elif isinstance(key, int): | |||
return [self.connectors[key]] | |||
elif isinstance(key, type): | |||
key = key.__name__ |
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.
This makes it so that we can fetch all SynchedFilters.
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.
Makes so much sense.
Thanks.
Test failures look unrelated |
Signed-off-by: Artur Niederfahrenhorst <[email protected]> Signed-off-by: Weichen Xu <[email protected]>
Signed-off-by: Artur Niederfahrenhorst [email protected]
Why are these changes needed?
When creating filter connectors, these are not properly added to the RolloutWorker's filters.
That is because we scanned for them by class name, rather than with issubclass.
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.