Browse Source

解决任务名重复的问题。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.10.1^2
zouap 3 years ago
parent
commit
bd63bb1505
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      routers/repo/aisafety.go

+ 7
- 2
routers/repo/aisafety.go View File

@@ -640,10 +640,8 @@ func AiSafetyCreateForPost(ctx *context.Context) {
return
}
if taskType == models.TypeCloudBrainTwo {
ctx.Data["datasetType"] = models.TypeCloudBrainTwo
err = createForNPU(ctx, jobName)
} else if taskType == models.TypeCloudBrainOne {
ctx.Data["datasetType"] = models.TypeCloudBrainOne
err = createForGPU(ctx, jobName)
}
if err != nil {
@@ -971,11 +969,18 @@ func modelSafetyNewDataPrepare(ctx *context.Context) error {
ctx.Data["model_version"] = ctx.Query("model_version")

if ctx.QueryInt("type") == models.TypeCloudBrainOne {
ctx.Data["type"] = models.TypeCloudBrainOne
ctx.Data["compute_resource"] = models.GPUResource
ctx.Data["datasetType"] = models.TypeCloudBrainOne

ctx.Data["BaseDataSetName"] = setting.ModelSafetyTest.GPUBaseDataSetName
ctx.Data["BaseDataSetUUID"] = setting.ModelSafetyTest.GPUBaseDataSetUUID
ctx.Data["CombatDataSetName"] = setting.ModelSafetyTest.GPUCombatDataSetName
ctx.Data["CombatDataSetUUID"] = setting.ModelSafetyTest.GPUCombatDataSetUUID
} else {
ctx.Data["type"] = models.TypeCloudBrainTwo
ctx.Data["compute_resource"] = models.NPUResource
ctx.Data["datasetType"] = models.TypeCloudBrainTwo
ctx.Data["BaseDataSetName"] = setting.ModelSafetyTest.NPUBaseDataSetName
ctx.Data["BaseDataSetUUID"] = setting.ModelSafetyTest.NPUBaseDataSetUUID
ctx.Data["CombatDataSetName"] = setting.ModelSafetyTest.NPUCombatDataSetName


Loading…
Cancel
Save