|
|
@@ -27,7 +27,6 @@ func CloudBrainAiSafetyCreateTest(ctx *context.Context) { |
|
|
|
//if jobType == string(models.JobTypeBenchmark) { |
|
|
|
jsonStr, err := getJsonContent("http://192.168.207.34:8065/Test_zap1234/openi_aisafety/raw/branch/master/result/0301.json") |
|
|
|
if err == nil { |
|
|
|
|
|
|
|
req := aisafety.TaskReq{ |
|
|
|
UnionId: id, |
|
|
|
EvalName: "test", |
|
|
@@ -37,11 +36,15 @@ func CloudBrainAiSafetyCreateTest(ctx *context.Context) { |
|
|
|
CDName: "cifar10_1000_BA", |
|
|
|
BDName: "cifar10_1000", |
|
|
|
} |
|
|
|
|
|
|
|
aisafety.GetAlgorithmList() |
|
|
|
aisafety.CreateSafetyTask(req, jsonStr) |
|
|
|
time.Sleep(time.Duration(2) * time.Second) |
|
|
|
aisafety.GetTaskStatus(id) |
|
|
|
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()) |
|
|
|
} |
|
|
|
} |
|
|
|
//} |
|
|
|
} |
|
|
|