|
|
@@ -283,11 +283,13 @@ func CloudBrainCreate(ctx *context.Context, form auth.CreateCloudBrainForm) { |
|
|
|
mkModelPath(modelPath) |
|
|
|
uploadCodeToMinio(modelPath, jobName, cloudbrain.ModelMountPath+"/") |
|
|
|
|
|
|
|
commitID, _ := ctx.Repo.GitRepo.GetBranchCommitID(branchName) |
|
|
|
|
|
|
|
err = cloudbrain.GenerateTask(ctx, displayJobName, jobName, image, command, uuid, storage.GetMinioPath(jobName, cloudbrain.CodeMountPath+"/"), |
|
|
|
storage.GetMinioPath(jobName, cloudbrain.ModelMountPath+"/"), |
|
|
|
storage.GetMinioPath(jobName, cloudbrain.BenchMarkMountPath+"/"), storage.GetMinioPath(jobName, cloudbrain.Snn4imagenetMountPath+"/"), |
|
|
|
storage.GetMinioPath(jobName, cloudbrain.BrainScoreMountPath+"/"), jobType, gpuQueue, form.Description, branchName, form.BootFile, form.Params, |
|
|
|
0, 0, resourceSpecId) |
|
|
|
commitID, 0, 0, resourceSpecId) |
|
|
|
if err != nil { |
|
|
|
cloudBrainNewDataPrepare(ctx) |
|
|
|
ctx.RenderWithErr(err.Error(), tpl, &form) |
|
|
@@ -1984,7 +1986,7 @@ func BenchMarkAlgorithmCreate(ctx *context.Context, form auth.CreateCloudBrainFo |
|
|
|
storage.GetMinioPath(jobName, cloudbrain.ModelMountPath+"/"), |
|
|
|
storage.GetMinioPath(jobName, cloudbrain.BenchMarkMountPath+"/"), storage.GetMinioPath(jobName, cloudbrain.Snn4imagenetMountPath+"/"), |
|
|
|
storage.GetMinioPath(jobName, cloudbrain.BrainScoreMountPath+"/"), string(models.JobTypeBenchmark), gpuQueue, form.Description, cloudbrain.DefaultBranchName, "", "", |
|
|
|
benchmarkTypeID, benchmarkChildTypeID, resourceSpecId) |
|
|
|
"", benchmarkTypeID, benchmarkChildTypeID, resourceSpecId) |
|
|
|
if err != nil { |
|
|
|
cloudBrainNewDataPrepare(ctx) |
|
|
|
ctx.RenderWithErr(err.Error(), tplCloudBrainBenchmarkNew, &form) |
|
|
@@ -2082,7 +2084,7 @@ func ModelBenchmarkCreate(ctx *context.Context, form auth.CreateCloudBrainForm) |
|
|
|
storage.GetMinioPath(jobName, cloudbrain.ModelMountPath+"/"), |
|
|
|
storage.GetMinioPath(jobName, cloudbrain.BenchMarkMountPath+"/"), storage.GetMinioPath(jobName, cloudbrain.Snn4imagenetMountPath+"/"), |
|
|
|
storage.GetMinioPath(jobName, cloudbrain.BrainScoreMountPath+"/"), jobType, gpuQueue, form.Description, branchName, form.BootFile, form.Params, |
|
|
|
0, benchmarkChildTypeID, resourceSpecId) |
|
|
|
"", 0, benchmarkChildTypeID, resourceSpecId) |
|
|
|
if err != nil { |
|
|
|
cloudBrainNewDataPrepare(ctx) |
|
|
|
ctx.RenderWithErr(err.Error(), tpl, &form) |
|
|
|