-
Notifications
You must be signed in to change notification settings - Fork 706
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
fix: support MxNet single host training when update mxJob status #1644
Conversation
/assign @terrytangyuan |
Pull Request Test Coverage Report for Build 2829463174
💛 - Coveralls |
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.
Why is the additional check necessary?
In order to support MxNet single host training, In this scenario, You only need to create one worker node. |
/retest |
@@ -336,6 +336,9 @@ func (r *MXJobReconciler) UpdateJobStatus(job interface{}, replicas map[commonv1 | |||
} | |||
} | |||
|
|||
//check whether mxnet Single Host training | |||
singleTraining := r.onlyHasReplicaTypeWorker(replicas) |
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.
singleHost
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.
Please update your comment to a complete sentence
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.
done
@@ -465,3 +468,18 @@ func (r *MXJobReconciler) onOwnerCreateFunc() func(event.CreateEvent) bool { | |||
return true | |||
} | |||
} | |||
|
|||
func (r *MXJobReconciler) onlyHasReplicaTypeWorker(replicas map[commonv1.ReplicaType]*commonv1.ReplicaSpec) bool { | |||
var workerNum, scheNum, srvNum int32 = 0, 0, 0 |
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.
svrNum
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.
done
@@ -465,3 +468,18 @@ func (r *MXJobReconciler) onOwnerCreateFunc() func(event.CreateEvent) bool { | |||
return true | |||
} | |||
} | |||
|
|||
func (r *MXJobReconciler) onlyHasReplicaTypeWorker(replicas map[commonv1.ReplicaType]*commonv1.ReplicaSpec) bool { |
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.
isSingleWorker
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.
done
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.
Thanks!
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: PeterChg, terrytangyuan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
Which issue(s) this PR fixes (optional, in
Fixes #<issue number>, #<issue number>, ...
format, will close the issue(s) when PR gets merged):Fixes #
Checklist: