| @@ -255,6 +255,11 @@ func grampusParamCheckCreateTrainJob(form auth.CreateGrampusTrainJobForm) error | |||||
| func GrampusTrainJobGpuCreate(ctx *context.Context, form auth.CreateGrampusTrainJobForm) { | func GrampusTrainJobGpuCreate(ctx *context.Context, form auth.CreateGrampusTrainJobForm) { | ||||
| ctx.Data["IsCreate"] = true | ctx.Data["IsCreate"] = true | ||||
| grampusTrainJobGpuCreate(ctx, form) | |||||
| } | |||||
| func grampusTrainJobGpuCreate(ctx *context.Context, form auth.CreateGrampusTrainJobForm) { | |||||
| displayJobName := form.DisplayJobName | displayJobName := form.DisplayJobName | ||||
| jobName := util.ConvertDisplayJobNameToJobName(displayJobName) | jobName := util.ConvertDisplayJobNameToJobName(displayJobName) | ||||
| uuid := form.Attachment | uuid := form.Attachment | ||||
| @@ -483,9 +488,9 @@ func GrampusTrainJobVersionCreate(ctx *context.Context, form auth.CreateGrampusT | |||||
| ctx.Data["IsCreate"] = false | ctx.Data["IsCreate"] = false | ||||
| computeResource := ctx.Query("compute_resource") | computeResource := ctx.Query("compute_resource") | ||||
| if computeResource == models.GPUResource { | if computeResource == models.GPUResource { | ||||
| GrampusTrainJobGpuCreate(ctx, form) | |||||
| grampusTrainJobGpuCreate(ctx, form) | |||||
| } else if computeResource == models.NPUResource { | } else if computeResource == models.NPUResource { | ||||
| GrampusTrainJobNpuCreate(ctx, form) | |||||
| grampusTrainJobNpuCreate(ctx, form) | |||||
| } else { | } else { | ||||
| ctx.ServerError("resource error", errors.New("compute resource is not support")) | ctx.ServerError("resource error", errors.New("compute resource is not support")) | ||||
| return | return | ||||
| @@ -517,6 +522,11 @@ func checkSpecialPool(ctx *context.Context, resourceType string) string { | |||||
| func GrampusTrainJobNpuCreate(ctx *context.Context, form auth.CreateGrampusTrainJobForm) { | func GrampusTrainJobNpuCreate(ctx *context.Context, form auth.CreateGrampusTrainJobForm) { | ||||
| ctx.Data["IsCreate"] = true | ctx.Data["IsCreate"] = true | ||||
| grampusTrainJobNpuCreate(ctx, form) | |||||
| } | |||||
| func grampusTrainJobNpuCreate(ctx *context.Context, form auth.CreateGrampusTrainJobForm) { | |||||
| displayJobName := form.DisplayJobName | displayJobName := form.DisplayJobName | ||||
| jobName := util.ConvertDisplayJobNameToJobName(displayJobName) | jobName := util.ConvertDisplayJobNameToJobName(displayJobName) | ||||
| uuid := form.Attachment | uuid := form.Attachment | ||||