Browse Source

提交代码,删除多余的代码。

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

+ 0
- 34
routers/repo/aisafety.go View File

@@ -26,7 +26,6 @@ import (
"code.gitea.io/gitea/modules/util"
"code.gitea.io/gitea/services/cloudbrain/resource"
"code.gitea.io/gitea/services/reward/point/account"
uuid "github.com/satori/go.uuid"
)

const (
@@ -37,39 +36,6 @@ const (
tplModelSafetyTestShow = "repo/modelsafety/show"
)

func CloudBrainAiSafetyCreateTest(ctx *context.Context) {
log.Info("start to create CloudBrainAiSafetyCreate")
uuid := uuid.NewV4()
id := uuid.String()
seriaNoParas := ctx.Query("serialNo")
fileName := ctx.Query("fileName")

//if jobType == string(models.JobTypeBenchmark) {
req := aisafety.TaskReq{
UnionId: id,
EvalName: "test1",
EvalContent: "test1",
TLPath: "test1",
Indicators: []string{"ACC", "ASS"},
CDName: "CIFAR10_1000_FGSM",
BDName: "CIFAR10_1000基础数据集",
}
aisafety.GetAlgorithmList()
if seriaNoParas != "" {
aisafety.GetTaskStatus(seriaNoParas)
} else {
jsonStr, err := getJsonContent("http://192.168.207.34:8065/Test_zap1234/openi_aisafety/raw/branch/master/result/" + fileName)
serialNo, err := aisafety.CreateSafetyTask(req, jsonStr)
if err == nil {
log.Info("serialNo=" + serialNo)
time.Sleep(time.Duration(2) * time.Second)
aisafety.GetTaskStatus(serialNo)
} else {
log.Info("CreateSafetyTask error," + err.Error())
}
}
}

func GetAiSafetyTaskByJob(job *models.Cloudbrain) {
if job == nil {
log.Error("GetCloudbrainByJobID failed")


Loading…
Cancel
Save