From 415a6464002b879f2f7f5a3445f921b7c233a966 Mon Sep 17 00:00:00 2001 From: chenyifan01 Date: Tue, 29 Mar 2022 10:06:50 +0800 Subject: [PATCH 1/2] #1765 fix bug --- routers/api/v1/repo/modelarts.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/api/v1/repo/modelarts.go b/routers/api/v1/repo/modelarts.go index d7d011e07..d5a152b35 100755 --- a/routers/api/v1/repo/modelarts.go +++ b/routers/api/v1/repo/modelarts.go @@ -379,7 +379,7 @@ func GetModelArtsInferenceJob(ctx *context.APIContext) { job.Duration = result.Duration / 1000 job.TrainJobDuration = result.TrainJobDuration - job.TrainJobDuration = models.ConvertDurationToStr(result.Duration) + job.TrainJobDuration = models.ConvertDurationToStr(job.Duration) if job.EndTime == 0 && models.IsTrainJobTerminal(job.Status) && job.StartTime > 0 { job.EndTime = job.StartTime.Add(job.Duration) From 7f84d50c52e16cb9581e615d21b130d9d82c3f28 Mon Sep 17 00:00:00 2001 From: chenyifan01 Date: Tue, 29 Mar 2022 10:30:27 +0800 Subject: [PATCH 2/2] #1765 fix bug --- routers/api/v1/repo/modelarts.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/routers/api/v1/repo/modelarts.go b/routers/api/v1/repo/modelarts.go index d5a152b35..660efdfef 100755 --- a/routers/api/v1/repo/modelarts.go +++ b/routers/api/v1/repo/modelarts.go @@ -377,8 +377,6 @@ func GetModelArtsInferenceJob(ctx *context.APIContext) { } job.Status = modelarts.TransTrainJobStatus(result.IntStatus) job.Duration = result.Duration / 1000 - job.TrainJobDuration = result.TrainJobDuration - job.TrainJobDuration = models.ConvertDurationToStr(job.Duration) if job.EndTime == 0 && models.IsTrainJobTerminal(job.Status) && job.StartTime > 0 {