diff --git a/routers/api/v1/repo/cloudbrain.go b/routers/api/v1/repo/cloudbrain.go index c618e31b4..05adb8761 100755 --- a/routers/api/v1/repo/cloudbrain.go +++ b/routers/api/v1/repo/cloudbrain.go @@ -402,6 +402,7 @@ func ModelSafetyGetLog(ctx *context.APIContext) { existStr = taskRes.TaskStatuses[0].ExitDiagnostics } ctx.Data["existStr"] = existStr + log.Info("existStr=" + existStr) CloudbrainGetLog(ctx) } else if job.Type == models.TypeCloudBrainTwo { TrainJobForModelConvertGetLog(ctx) @@ -469,7 +470,7 @@ func CloudbrainGetLog(ctx *context.APIContext) { order := ctx.Query("order") var result map[string]interface{} resultPath := "/model" - if job.JobType == string(models.JobTypeInference) { + if job.JobType == string(models.JobTypeInference) || job.JobType == string(models.JobTypeModelSafety) { resultPath = "/result" } if baseLine == "" && order == "desc" { diff --git a/routers/repo/aisafety.go b/routers/repo/aisafety.go index 4f8f4abb6..de33a03fc 100644 --- a/routers/repo/aisafety.go +++ b/routers/repo/aisafety.go @@ -445,8 +445,8 @@ func sendGPUInferenceResultToTest(job *models.Cloudbrain) { BDName: datasetnames[0], } - resultDir := "/model" - prefix := "/" + setting.CBCodePathPrefix + job.JobName + resultDir + resultDir := "/result" + prefix := setting.CBCodePathPrefix + job.JobName + resultDir files, err := storage.GetOneLevelAllObjectUnderDirMinio(setting.Attachment.Minio.Bucket, prefix, "") if err != nil { log.Error("query cloudbrain one model failed: %v", err) @@ -968,7 +968,7 @@ func getGpuModelSafetyCommand(BootFile string, params string, CkptName string, D param += " --ckpt_url=" + cloudbrain.ModelMountPath + "/" + CkptName - command += "python /code/" + bootFile + param + " > " + cloudbrain.ModelMountPath + "/" + DisplayJobName + "-" + cloudbrain.LogFile + command += "python /code/" + bootFile + param + " > " + cloudbrain.ResultPath + "/" + DisplayJobName + "-" + cloudbrain.LogFile return command, nil }