|
|
@@ -763,9 +763,23 @@ func trainJobNewDataPrepare(ctx *context.Context) error { |
|
|
|
waitCount := cloudbrain.GetWaitingCloudbrainCount(models.TypeCloudBrainTwo, "") |
|
|
|
ctx.Data["WaitCount"] = waitCount |
|
|
|
|
|
|
|
setMultiNodeIfConfigureMatch(ctx) |
|
|
|
|
|
|
|
return nil |
|
|
|
} |
|
|
|
|
|
|
|
func setMultiNodeIfConfigureMatch(ctx *context.Context) { |
|
|
|
modelarts.InitMultiNode() |
|
|
|
if modelarts.MultiNodeConfig != nil { |
|
|
|
for _, info := range modelarts.MultiNodeConfig.Info { |
|
|
|
if isInOrg, _ := models.IsOrganizationMemberByOrgName(info.Org, ctx.User.ID); isInOrg { |
|
|
|
ctx.Data["WorkNode"] = info.Node |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
func setSpecBySpecialPoolConfig(ctx *context.Context, jobType string) { |
|
|
|
modelarts.InitSpecialPool() |
|
|
|
|
|
|
@@ -880,6 +894,7 @@ func trainJobErrorNewDataPrepare(ctx *context.Context, form auth.CreateModelArts |
|
|
|
ctx.Data["datasetType"] = models.TypeCloudBrainTwo |
|
|
|
waitCount := cloudbrain.GetWaitingCloudbrainCount(models.TypeCloudBrainTwo, "") |
|
|
|
ctx.Data["WaitCount"] = waitCount |
|
|
|
setMultiNodeIfConfigureMatch(ctx) |
|
|
|
|
|
|
|
return nil |
|
|
|
} |
|
|
|