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] Smaller eval worker set fixes. #28811

Merged
merged 4 commits into from
Sep 28, 2022

Conversation

sven1977
Copy link
Contributor

@sven1977 sven1977 commented Sep 27, 2022

Signed-off-by: sven1977 [email protected]

Smaller eval worker set fixes.

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 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 <[email protected]>
@@ -1147,6 +1148,11 @@ def remote_fn(worker, w_ref, w_seq_no):
# subsequent step results as latest evaluation result.
self.evaluation_metrics = {"evaluation": metrics}

# Trigger `on_evaluate_end` callback.
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 callback was missing for enable_async_evaluation=True setting.

@@ -2701,7 +2707,11 @@ def _run_one_evaluation(
if self.evaluation_workers is not None
else 0
)
eval_results["evaluation"]["num_recreated_workers"] = num_recreated
# Worker failures might have already been handled within `self._evaluate_async`
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 count would be overridden by 0 for enable_async_evaluation=True.

Copy link
Member

Choose a reason for hiding this comment

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

🤔 wonder if we should move this try_recover_from_step_attempt() into self.evaluate() then.
or, I actually need to refactor all the remote gets anyways for elastic training. so maybe I can clean this up when I get to remote_req_manager.

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.

ok, can you maybe add a TODO for me above the if statement, like:

TODO(jungong) : revisit after elastic async evaluation is done.

@@ -2701,7 +2707,11 @@ def _run_one_evaluation(
if self.evaluation_workers is not None
else 0
)
eval_results["evaluation"]["num_recreated_workers"] = num_recreated
# Worker failures might have already been handled within `self._evaluate_async`
Copy link
Member

Choose a reason for hiding this comment

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

🤔 wonder if we should move this try_recover_from_step_attempt() into self.evaluate() then.
or, I actually need to refactor all the remote gets anyways for elastic training. so maybe I can clean this up when I get to remote_req_manager.

@sven1977 sven1977 merged commit 0686f36 into ray-project:master Sep 28, 2022
WeichenXu123 pushed a commit to WeichenXu123/ray that referenced this pull request Dec 19, 2022
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