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] Add config option to enable/disable TO vs FROM worker filter updates (aka filter syncing). #36204

Conversation

sven1977
Copy link
Contributor

@sven1977 sven1977 commented Jun 8, 2023

Add config option to enable/disable TO vs FROM worker filter updates (aka filter syncing):

  • Currently, RLlib has no config option to specifically tell an algorithm to NOT use a WorkerSet's remote worker filters for synching into the central filters (held by the local worker).
  • RLlib only has an option (config.synchronize_filter) to NOT update a WorkerSet's remote worker filters from the central filters (held by the local workers).

This PR introduces the missing setting (config.use_worker_filter_stats) and clarifies the difference between these two options by better config property naming. The old setting name (config.synchronize_filter) has been soft-deprecated and replaced by config.update_worker_filter_stats.

Why are these changes needed?

Related issue number

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 added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • 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: sven1977 <svenmika1977@gmail.com>
@@ -1470,6 +1468,14 @@ def rollouts(
enable_connectors: Use connector based environment runner, so that all
preprocessing of obs and postprocessing of actions are done in agent
and action connectors.
use_worker_filter_stats: Whether to use the workers in the WorkerSet to
update the central filters (held by the local worker). If False, stats
from the workers will not be used ad discarded.
Copy link
Contributor

Choose a reason for hiding this comment

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

typo!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

for k in local_filters:
local_filters[k].apply_changes(rf[k], with_buffer=False)

# Should we update the remote workers' filters from the (now synched)
Copy link
Contributor

Choose a reason for hiding this comment

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

"now possibly synched?"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@sven1977
Copy link
Contributor Author

Thanks for your review @ArturNiederfahrenhorst ! :) Will fix the issues and then merge.

sven1977 added 3 commits June 14, 2023 10:12
…config_option_to_not_include_eval_data_in_filter_stats
Signed-off-by: sven1977 <svenmika1977@gmail.com>
Signed-off-by: sven1977 <svenmika1977@gmail.com>
@sven1977 sven1977 merged commit 181330c into ray-project:master Jun 14, 2023
arvind-chandra pushed a commit to lmco/ray that referenced this pull request Aug 31, 2023
…updates (aka filter syncing). (ray-project#36204)

Signed-off-by: e428265 <arvind.chandramouli@lmco.com>
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