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] Don't sync (old API stack) connector states after worker restore. #47021

Conversation

sven1977
Copy link
Contributor

@sven1977 sven1977 commented Aug 8, 2024

This PR changes:

  • By default, all mark_healthy method args are set to False. We do not want to mark any actors back from unhealthy to healthy, unless a successful "probe" request has been sent in a controlled fashion by the Algorithm.
  • Therefore, all calls to EnvRunnerGroup.probe_unhealthy_actors now manually set this arg to True. There are only 2 instances of this call: algorithm.py and in IMPALA (for the aggregation worker set).
  • Old API stack only: We also do NOT sync connector states anymore from the local worker after an EnvRunner has been restarted and restored (in Algorithm.restore_workers()).

TODO: File issue.
TODO: Add a repro script as test case for the issue that originally led us to investigate this issue.

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 :(

…gorithm.restore_workers) directly after their recovery.

Signed-off-by: sven1977 <[email protected]>
…gorithm.restore_workers) directly after their recovery.

Signed-off-by: sven1977 <[email protected]>
…rker's state after a worker has been restored and before it is synched with the local worker's state.

The re-creation of the connectors on the already instantiated (restored) new worker broke things, b/c the AgentCollector that one of the "agent" connector pieces points to has already undergone some change and is then re-created, which breaks the stored vf-pred value (and other "extra fetches").

Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
@sven1977 sven1977 enabled auto-merge (squash) August 16, 2024 10:04
@github-actions github-actions bot added the go add ONLY when ready to merge, run all tests label Aug 16, 2024
Copy link
Collaborator

@simonsays1980 simonsays1980 left a comment

Choose a reason for hiding this comment

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

LGTM.

@@ -1073,6 +1073,7 @@ def _training_step_old_api_stack(self):
if self._aggregator_actor_manager:
self._aggregator_actor_manager.probe_unhealthy_actors(
timeout_seconds=self.config.env_runner_health_probe_timeout_s,
mark_healthy=True,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this only look unformatted?

@github-actions github-actions bot disabled auto-merge August 16, 2024 16:19
@sven1977 sven1977 merged commit 4178ecd into ray-project:master Aug 16, 2024
5 checks passed
@sven1977 sven1977 deleted the dont_sync_connector_states_after_worker_restore branch August 27, 2024 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go add ONLY when ready to merge, run all tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants