| @@ -402,6 +402,7 @@ func ModelSafetyGetLog(ctx *context.APIContext) { | |||||
| existStr = taskRes.TaskStatuses[0].ExitDiagnostics | existStr = taskRes.TaskStatuses[0].ExitDiagnostics | ||||
| } | } | ||||
| ctx.Data["existStr"] = existStr | ctx.Data["existStr"] = existStr | ||||
| log.Info("existStr=" + existStr) | |||||
| CloudbrainGetLog(ctx) | CloudbrainGetLog(ctx) | ||||
| } else if job.Type == models.TypeCloudBrainTwo { | } else if job.Type == models.TypeCloudBrainTwo { | ||||
| TrainJobForModelConvertGetLog(ctx) | TrainJobForModelConvertGetLog(ctx) | ||||
| @@ -469,7 +470,7 @@ func CloudbrainGetLog(ctx *context.APIContext) { | |||||
| order := ctx.Query("order") | order := ctx.Query("order") | ||||
| var result map[string]interface{} | var result map[string]interface{} | ||||
| resultPath := "/model" | resultPath := "/model" | ||||
| if job.JobType == string(models.JobTypeInference) { | |||||
| if job.JobType == string(models.JobTypeInference) || job.JobType == string(models.JobTypeModelSafety) { | |||||
| resultPath = "/result" | resultPath = "/result" | ||||
| } | } | ||||
| if baseLine == "" && order == "desc" { | if baseLine == "" && order == "desc" { | ||||
| @@ -445,8 +445,8 @@ func sendGPUInferenceResultToTest(job *models.Cloudbrain) { | |||||
| BDName: datasetnames[0], | 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, "") | files, err := storage.GetOneLevelAllObjectUnderDirMinio(setting.Attachment.Minio.Bucket, prefix, "") | ||||
| if err != nil { | if err != nil { | ||||
| log.Error("query cloudbrain one model failed: %v", err) | 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 | 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 | return command, nil | ||||
| } | } | ||||