|
|
|
@@ -51,11 +51,11 @@ func DebugJobIndex(ctx *context.Context) { |
|
|
|
} |
|
|
|
debugType := modelarts.DebugType |
|
|
|
jobType := string(models.JobTypeDebug) |
|
|
|
if debugListType == modelarts.GPUResource { |
|
|
|
if debugListType == models.GPUResource { |
|
|
|
debugType = models.TypeCloudBrainOne |
|
|
|
jobType = "" |
|
|
|
} |
|
|
|
if debugListType == modelarts.NPUResource { |
|
|
|
if debugListType == models.NPUResource { |
|
|
|
debugType = models.TypeCloudBrainTwo |
|
|
|
} |
|
|
|
|
|
|
|
@@ -76,16 +76,10 @@ func DebugJobIndex(ctx *context.Context) { |
|
|
|
for i, task := range ciTasks { |
|
|
|
ciTasks[i].CanDebug = cloudbrain.CanCreateOrDebugJob(ctx) |
|
|
|
ciTasks[i].CanDel = cloudbrain.CanDeleteJob(ctx, &task.Cloudbrain) |
|
|
|
|
|
|
|
if task.Cloudbrain.Type == models.TypeCloudBrainOne { |
|
|
|
ciTasks[i].Cloudbrain.ComputeResource = modelarts.GPUResource |
|
|
|
} else if task.Cloudbrain.Type == models.TypeCloudBrainTwo { |
|
|
|
ciTasks[i].Cloudbrain.ComputeResource = modelarts.NPUResource |
|
|
|
} |
|
|
|
ciTasks[i].Cloudbrain.ComputeResource = task.ComputeResource |
|
|
|
} |
|
|
|
|
|
|
|
pager := context.NewPagination(int(count), setting.UI.IssuePagingNum, page, 5) |
|
|
|
//pager.SetDefaultParams(ctx) |
|
|
|
pager.AddParam(ctx, "debugListType", "ListType") |
|
|
|
ctx.Data["Page"] = pager |
|
|
|
ctx.Data["PageIsCloudBrain"] = true |
|
|
|
@@ -345,7 +339,7 @@ func NotebookDel(ctx *context.Context) { |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
ctx.Redirect(setting.AppSubURL + ctx.Repo.RepoLink + "/debugjob") |
|
|
|
ctx.Redirect(setting.AppSubURL + ctx.Repo.RepoLink + "/debugjob?debugListType=all") |
|
|
|
} |
|
|
|
|
|
|
|
func TrainJobIndex(ctx *context.Context) { |
|
|
|
@@ -375,7 +369,7 @@ func TrainJobIndex(ctx *context.Context) { |
|
|
|
for i, task := range tasks { |
|
|
|
tasks[i].CanDel = cloudbrain.CanDeleteJob(ctx, &task.Cloudbrain) |
|
|
|
tasks[i].CanModify = cloudbrain.CanModifyJob(ctx, &task.Cloudbrain) |
|
|
|
tasks[i].ComputeResource = modelarts.NPUResource |
|
|
|
tasks[i].ComputeResource = models.NPUResource |
|
|
|
} |
|
|
|
|
|
|
|
pager := context.NewPagination(int(count), setting.UI.IssuePagingNum, page, 5) |
|
|
|
|