|
|
|
@@ -415,7 +415,16 @@ func cloudBrainShow(ctx *context.Context, tpName base.TplName, jobType models.Jo |
|
|
|
jobRes.Resource.Memory = strings.ReplaceAll(jobRes.Resource.Memory, "Mi", "MB") |
|
|
|
spec := "GPU数:" + strconv.Itoa(jobRes.Resource.NvidiaComGpu) + ",CPU数:" + strconv.Itoa(jobRes.Resource.CPU) + ",内存(MB):" + jobRes.Resource.Memory |
|
|
|
ctx.Data["resource_spec"] = spec |
|
|
|
ctx.Data["resource_type"] = jobRes.Config.GpuType |
|
|
|
if task.JobType == string(models.JobTypeTrain) { |
|
|
|
if trainGpuInfos == nil { |
|
|
|
json.Unmarshal([]byte(setting.TrainGpuTypes), &trainGpuInfos) |
|
|
|
} |
|
|
|
for _, resourceType := range trainGpuInfos.GpuInfo { |
|
|
|
if resourceType.Queue == jobRes.Config.GpuType { |
|
|
|
ctx.Data["resource_type"] = resourceType.Value |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
taskRoles := jobRes.TaskRoles |
|
|
|
if jobRes.JobStatus.State != string(models.JobFailed) { |
|
|
|
|
|
|
|
|