Skip to content

Commit

Permalink
fix mpijob role
Browse files Browse the repository at this point in the history
  • Loading branch information
D0m021ng committed Jan 8, 2024
1 parent d862b96 commit 017b9b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/apiserver/controller/job/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ func getPyTorchJobRoleAndIndex(name string, annotations map[string]string) (sche
// getMPIJobRoleAndIndex returns the runtime info of mpi job
func getMPIJobRoleAndIndex(name string, annotations map[string]string) (schema.MemberRole, int) {
taskRole, taskIndex := schema.RoleWorker, 0
if annotations["volcano.sh/task-spec"] == "master" {
if strings.HasSuffix(name, "launcher") {
taskRole = schema.RoleMaster
} else {
// worker is named with format: xxxx-worker-0
Expand Down

0 comments on commit 017b9b1

Please sign in to comment.