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] Fix RolloutWorker filter syncing #30257

Merged

Conversation

ArturNiederfahrenhorst
Copy link
Contributor

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

  • 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]>
@@ -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, (
Copy link
Contributor Author

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__
Copy link
Contributor Author

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]>
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.

Makes so much sense.
Thanks.

@gjoliver
Copy link
Member

Test failures look unrelated

@gjoliver gjoliver merged commit 693b9ce into ray-project:master Nov 16, 2022
WeichenXu123 pushed a commit to WeichenXu123/ray that referenced this pull request Dec 19, 2022
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Signed-off-by: Weichen Xu <[email protected]>
@ArturNiederfahrenhorst ArturNiederfahrenhorst deleted the fixfilterconnectorssync branch January 5, 2023 15:37
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