|
|
|
@@ -191,9 +191,7 @@ func CloudBrainCreate(ctx *context.Context, form auth.CreateCloudBrainForm) { |
|
|
|
image := strings.TrimSpace(form.Image) |
|
|
|
uuids := form.Attachment |
|
|
|
jobType := form.JobType |
|
|
|
gpuQueue := form.GpuType |
|
|
|
codePath := setting.JobPath + jobName + cloudbrain.CodeMountPath |
|
|
|
resourceSpecId := form.ResourceSpecId |
|
|
|
branchName := form.BranchName |
|
|
|
repo := ctx.Repo.Repository |
|
|
|
tpl := tplCloudBrainNew |
|
|
|
@@ -311,7 +309,6 @@ func CloudBrainCreate(ctx *context.Context, form auth.CreateCloudBrainForm) { |
|
|
|
Snn4ImageNetPath: storage.GetMinioPath(jobName, cloudbrain.Snn4imagenetMountPath+"/"), |
|
|
|
BrainScorePath: storage.GetMinioPath(jobName, cloudbrain.BrainScoreMountPath+"/"), |
|
|
|
JobType: jobType, |
|
|
|
GpuQueue: gpuQueue, |
|
|
|
Description: form.Description, |
|
|
|
BranchName: branchName, |
|
|
|
BootFile: form.BootFile, |
|
|
|
@@ -319,7 +316,6 @@ func CloudBrainCreate(ctx *context.Context, form auth.CreateCloudBrainForm) { |
|
|
|
CommitID: commitID, |
|
|
|
BenchmarkTypeID: 0, |
|
|
|
BenchmarkChildTypeID: 0, |
|
|
|
ResourceSpecId: resourceSpecId, |
|
|
|
ResultPath: storage.GetMinioPath(jobName, cloudbrain.ResultPath+"/"), |
|
|
|
Spec: spec, |
|
|
|
} |
|
|
|
@@ -369,9 +365,7 @@ func CloudBrainInferenceJobCreate(ctx *context.Context, form auth.CreateCloudBra |
|
|
|
image := strings.TrimSpace(form.Image) |
|
|
|
uuid := form.Attachment |
|
|
|
jobType := string(models.JobTypeInference) |
|
|
|
gpuQueue := form.GpuType |
|
|
|
codePath := setting.JobPath + jobName + cloudbrain.CodeMountPath |
|
|
|
resourceSpecId := form.ResourceSpecId |
|
|
|
branchName := form.BranchName |
|
|
|
labelName := form.LabelName |
|
|
|
repo := ctx.Repo.Repository |
|
|
|
@@ -469,13 +463,11 @@ func CloudBrainInferenceJobCreate(ctx *context.Context, form auth.CreateCloudBra |
|
|
|
Snn4ImageNetPath: storage.GetMinioPath(jobName, cloudbrain.Snn4imagenetMountPath+"/"), |
|
|
|
BrainScorePath: storage.GetMinioPath(jobName, cloudbrain.BrainScoreMountPath+"/"), |
|
|
|
JobType: jobType, |
|
|
|
GpuQueue: gpuQueue, |
|
|
|
Description: form.Description, |
|
|
|
BranchName: branchName, |
|
|
|
BootFile: form.BootFile, |
|
|
|
Params: form.Params, |
|
|
|
CommitID: commitID, |
|
|
|
ResourceSpecId: resourceSpecId, |
|
|
|
ResultPath: storage.GetMinioPath(jobName, cloudbrain.ResultPath+"/"), |
|
|
|
ModelName: form.ModelName, |
|
|
|
ModelVersion: form.ModelVersion, |
|
|
|
@@ -2201,10 +2193,8 @@ func BenchMarkAlgorithmCreate(ctx *context.Context, form auth.CreateCloudBrainFo |
|
|
|
displayJobName := form.DisplayJobName |
|
|
|
jobName := util.ConvertDisplayJobNameToJobName(displayJobName) |
|
|
|
image := strings.TrimSpace(form.Image) |
|
|
|
gpuQueue := form.GpuType |
|
|
|
command := cloudbrain.CommandBenchmark |
|
|
|
codePath := setting.JobPath + jobName + cloudbrain.CodeMountPath |
|
|
|
resourceSpecId := cloudbrain.BenchMarkResourceID |
|
|
|
benchmarkTypeID := form.BenchmarkTypeID |
|
|
|
benchmarkChildTypeID := form.BenchmarkChildTypeID |
|
|
|
|
|
|
|
@@ -2352,7 +2342,6 @@ func BenchMarkAlgorithmCreate(ctx *context.Context, form auth.CreateCloudBrainFo |
|
|
|
Snn4ImageNetPath: storage.GetMinioPath(jobName, cloudbrain.Snn4imagenetMountPath+"/"), |
|
|
|
BrainScorePath: storage.GetMinioPath(jobName, cloudbrain.BrainScoreMountPath+"/"), |
|
|
|
JobType: string(models.JobTypeBenchmark), |
|
|
|
GpuQueue: gpuQueue, |
|
|
|
Description: form.Description, |
|
|
|
BranchName: cloudbrain.DefaultBranchName, |
|
|
|
BootFile: "", |
|
|
|
@@ -2360,7 +2349,6 @@ func BenchMarkAlgorithmCreate(ctx *context.Context, form auth.CreateCloudBrainFo |
|
|
|
CommitID: "", |
|
|
|
BenchmarkTypeID: benchmarkTypeID, |
|
|
|
BenchmarkChildTypeID: benchmarkChildTypeID, |
|
|
|
ResourceSpecId: resourceSpecId, |
|
|
|
ResultPath: storage.GetMinioPath(jobName, cloudbrain.ResultPath+"/"), |
|
|
|
Spec: spec, |
|
|
|
} |
|
|
|
@@ -2382,9 +2370,7 @@ func ModelBenchmarkCreate(ctx *context.Context, form auth.CreateCloudBrainForm) |
|
|
|
image := form.Image |
|
|
|
uuid := form.Attachment |
|
|
|
jobType := form.JobType |
|
|
|
gpuQueue := form.GpuType |
|
|
|
codePath := setting.JobPath + jobName + cloudbrain.CodeMountPath |
|
|
|
resourceSpecId := form.ResourceSpecId |
|
|
|
branchName := cloudbrain.DefaultBranchName |
|
|
|
repo := ctx.Repo.Repository |
|
|
|
|
|
|
|
@@ -2491,7 +2477,6 @@ func ModelBenchmarkCreate(ctx *context.Context, form auth.CreateCloudBrainForm) |
|
|
|
Snn4ImageNetPath: storage.GetMinioPath(jobName, cloudbrain.Snn4imagenetMountPath+"/"), |
|
|
|
BrainScorePath: storage.GetMinioPath(jobName, cloudbrain.BrainScoreMountPath+"/"), |
|
|
|
JobType: jobType, |
|
|
|
GpuQueue: gpuQueue, |
|
|
|
Description: form.Description, |
|
|
|
BranchName: branchName, |
|
|
|
BootFile: form.BootFile, |
|
|
|
@@ -2499,7 +2484,6 @@ func ModelBenchmarkCreate(ctx *context.Context, form auth.CreateCloudBrainForm) |
|
|
|
CommitID: "", |
|
|
|
BenchmarkTypeID: 0, |
|
|
|
BenchmarkChildTypeID: benchmarkChildTypeID, |
|
|
|
ResourceSpecId: resourceSpecId, |
|
|
|
ResultPath: storage.GetMinioPath(jobName, cloudbrain.ResultPath+"/"), |
|
|
|
Spec: spec, |
|
|
|
} |
|
|
|
|