Browse Source

update

fix-1114-patch
Gitea 3 years ago
parent
commit
a96284c138
2 changed files with 4 additions and 3 deletions
  1. +1
    -1
      modules/cloudbrain/cloudbrain.go
  2. +3
    -2
      routers/repo/cloudbrain.go

+ 1
- 1
modules/cloudbrain/cloudbrain.go View File

@@ -108,7 +108,7 @@ func AdminOrJobCreaterRight(ctx *context.Context) {

}

func GenerateTask(ctx *context.Context, openiJobName, apiJobName, image, command, uuid, codePath, modelPath, benchmarkPath, snn4imagenetPath, brainScorePath, jobType, gpuQueue string, benchmarkTypeID, benchmarkChildTypeID, resourceSpecId int) error {
func GenerateTask(ctx *context.Context, openiJobName, apiJobName, image, command, uuid, codePath, modelPath, benchmarkPath, snn4imagenetPath, brainScorePath, jobType, gpuQueue, description string, benchmarkTypeID, benchmarkChildTypeID, resourceSpecId int) error {
dataActualPath := setting.Attachment.Minio.RealPath +
setting.Attachment.Minio.Bucket + "/" +
setting.Attachment.Minio.BasePath +


+ 3
- 2
routers/repo/cloudbrain.go View File

@@ -1207,7 +1207,8 @@ func getBenchmarkResourceSpec(resourceSpecID int) (int, error) {

func CloudBrainBenchmarkCreate(ctx *context.Context, form auth.CreateCloudBrainForm) {
ctx.Data["PageIsCloudBrain"] = true
jobName := form.JobName
openiJobName := form.JobName
jobName := util.ConvertToApiJobName(openiJobName)
image := form.Image
gpuQueue := form.GpuType
command := cloudbrain.CommandBenchmark
@@ -1339,7 +1340,7 @@ func CloudBrainBenchmarkCreate(ctx *context.Context, form auth.CreateCloudBrainF
//return
}

err = cloudbrain.GenerateTask(ctx, jobName, image, command, childInfo.Attachment, storage.GetMinioPath(jobName, cloudbrain.CodeMountPath+"/"),
err = cloudbrain.GenerateTask(ctx, openiJobName, jobName, image, command, childInfo.Attachment, 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+"/"), string(models.JobTypeBenchmark), gpuQueue, form.Description,


Loading…
Cancel
Save