-
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] Smaller eval worker set fixes. #28811
Conversation
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. |
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 callback was missing for enable_async_evaluation=True
setting.
rllib/algorithms/algorithm.py
Outdated
@@ -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` |
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 count would be overridden by 0 for enable_async_evaluation=True
.
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.
🤔 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.
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.
ok, can you maybe add a TODO for me above the if statement, like:
TODO(jungong) : revisit after elastic async evaluation is done.
rllib/algorithms/algorithm.py
Outdated
@@ -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` |
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.
🤔 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.
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: Weichen Xu <[email protected]>
Signed-off-by: sven1977 [email protected]
Smaller eval worker set fixes.
Why are these changes needed?
Related issue number
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.