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