-
Notifications
You must be signed in to change notification settings - Fork 166
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
Job exit when all nodecheck failed #1323
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -243,7 +243,42 @@ def is_all_reduce_type_job(self): | |
== DistributionStrategy.ALLREDUCE | ||
) | ||
|
||
def is_all_workers_node_check_failed(self): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Better move this function into |
||
return all( | ||
[ | ||
node.is_node_check_failed() | ||
for _, node in self._job_nodes[NodeType.WORKER].items() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
] | ||
) | ||
|
||
def should_early_stop(self): | ||
# node-check all failed | ||
if ( | ||
self.is_all_reduce_type_job() | ||
and self.is_all_workers_node_check_failed() | ||
): | ||
msg = ( | ||
"Stop the training early because all worker nodes has " | ||
"failed the node check in rendezvous." | ||
) | ||
|
||
self._process_error( | ||
None, | ||
0, | ||
msg, | ||
level=TrainingExceptionLevel.RDZV_ERROR, | ||
) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. process_error(message=msg, level=...) |
||
|
||
self._report_event( | ||
ErrorMonitorConstants.TYPE_INFO, | ||
"job", | ||
ErrorMonitorConstants.ACTION_EARLY_STOP, | ||
"All node check failed", | ||
{"nodes": json.dumps(self._worker_manager.cur_nodes)}, | ||
) | ||
|
||
return True, JobExitReason.RDZV_ALL_FAILED, msg | ||
|
||
# ps pending judgement: any ps pod pending timeout | ||
timeout_ps_nodes = ( | ||
self._ps_manager.get_pending_timeout_oom_recovered_node() | ||
|
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.
Change name to 'NodeCheckFailed'. This is actually a training failure, not a rdzv failure.