Browse Source

修正结果路径。

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

+ 2
- 1
routers/api/v1/repo/cloudbrain.go View File

@@ -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" {


+ 3
- 3
routers/repo/aisafety.go View File

@@ -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
}


Loading…
Cancel
Save