From 8dc844447386a88c06a59614a6f47abebae3398a Mon Sep 17 00:00:00 2001 From: zouap Date: Thu, 16 Feb 2023 09:56:18 +0800 Subject: [PATCH] =?UTF-8?q?#3713=E5=8F=8A#3714=E9=97=AE=E9=A2=98=E8=A7=A3?= =?UTF-8?q?=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/api/v1/repo/cloudbrain.go | 2 +- routers/repo/aisafety.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/routers/api/v1/repo/cloudbrain.go b/routers/api/v1/repo/cloudbrain.go index 90746a8f37..ece216daf9 100755 --- a/routers/api/v1/repo/cloudbrain.go +++ b/routers/api/v1/repo/cloudbrain.go @@ -693,7 +693,7 @@ func CloudbrainDownloadLogFile(ctx *context.Context) { } } if fileName != "" { - prefix := "/" + setting.CBCodePathPrefix + job.JobName + "/model" + prefix := "/" + setting.CBCodePathPrefix + job.JobName + logDir filePath := setting.Attachment.Minio.RealPath + setting.Attachment.Minio.Bucket + prefix + "/" + fileName // Read the file contents into a byte slice data, err := ioutil.ReadFile(filePath) diff --git a/routers/repo/aisafety.go b/routers/repo/aisafety.go index 3c270ca941..9330872426 100644 --- a/routers/repo/aisafety.go +++ b/routers/repo/aisafety.go @@ -313,7 +313,7 @@ func queryTaskStatusFromModelSafetyTestServer(job *models.Cloudbrain) { log.Info("The task is running....") } else { job.EndTime = timeutil.TimeStampNow() - job.Duration = (job.EndTime.AsTime().Unix() - job.StartTime.AsTime().Unix()) / 1000 + job.Duration = (job.EndTime.AsTime().Unix() - job.StartTime.AsTime().Unix()) job.TrainJobDuration = models.ConvertDurationToStr(job.Duration) if result.Data.Code == 0 { job.ResultJson = result.Data.StandardJson -- 2.34.1