From a96284c138a04acb6b82dfd0bc8e3da3004b281d Mon Sep 17 00:00:00 2001 From: Gitea Date: Tue, 15 Feb 2022 14:40:05 +0800 Subject: [PATCH] update --- modules/cloudbrain/cloudbrain.go | 2 +- routers/repo/cloudbrain.go | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/cloudbrain/cloudbrain.go b/modules/cloudbrain/cloudbrain.go index 071f62c07..a4f2d673e 100755 --- a/modules/cloudbrain/cloudbrain.go +++ b/modules/cloudbrain/cloudbrain.go @@ -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 + diff --git a/routers/repo/cloudbrain.go b/routers/repo/cloudbrain.go index 9c31df08e..52691a4ea 100755 --- a/routers/repo/cloudbrain.go +++ b/routers/repo/cloudbrain.go @@ -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,