|
|
|
@@ -357,14 +357,14 @@ func NotebookShow(ctx *context.Context) { |
|
|
|
task, err := models.GetCloudbrainByJobID(jobID) |
|
|
|
if err != nil { |
|
|
|
ctx.Data["error"] = err.Error() |
|
|
|
ctx.RenderWithErr(err.Error(), tplModelArtsNotebookIndex, nil) |
|
|
|
ctx.RenderWithErr(err.Error(), tplModelArtsNotebookShow, nil) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
result, err := modelarts.GetJob(jobID) |
|
|
|
if err != nil { |
|
|
|
ctx.Data["error"] = err.Error() |
|
|
|
ctx.RenderWithErr(err.Error(), tplModelArtsNotebookIndex, nil) |
|
|
|
ctx.RenderWithErr(err.Error(), tplModelArtsNotebookShow, nil) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
@@ -373,7 +373,7 @@ func NotebookShow(ctx *context.Context) { |
|
|
|
err = models.UpdateJob(task) |
|
|
|
if err != nil { |
|
|
|
ctx.Data["error"] = err.Error() |
|
|
|
ctx.RenderWithErr(err.Error(), tplModelArtsNotebookIndex, nil) |
|
|
|
ctx.RenderWithErr(err.Error(), tplModelArtsNotebookShow, nil) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
@@ -838,21 +838,21 @@ func TrainJobShow(ctx *context.Context) { |
|
|
|
task, err := models.GetCloudbrainByJobID(jobID) |
|
|
|
if err != nil { |
|
|
|
log.Error("GetCloudbrainByJobID(%s) failed:%v", jobID, err.Error()) |
|
|
|
ctx.RenderWithErr(err.Error(), tplModelArtsTrainJobIndex, nil) |
|
|
|
ctx.RenderWithErr(err.Error(), tplModelArtsTrainJobShow, nil) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
attach, err := models.GetAttachmentByUUID(task.Uuid) |
|
|
|
if err != nil { |
|
|
|
log.Error("GetAttachmentByUUID(%s) failed:%v", jobID, err.Error()) |
|
|
|
ctx.RenderWithErr(err.Error(), tplModelArtsTrainJobIndex, nil) |
|
|
|
ctx.RenderWithErr(err.Error(), tplModelArtsTrainJobShow, nil) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
result, err := modelarts.GetTrainJob(jobID, strconv.FormatInt(task.VersionID, 10)) |
|
|
|
if err != nil { |
|
|
|
log.Error("GetJob(%s) failed:%v", jobID, err.Error()) |
|
|
|
ctx.RenderWithErr(err.Error(), tplModelArtsTrainJobIndex, nil) |
|
|
|
ctx.RenderWithErr(err.Error(), tplModelArtsTrainJobShow, nil) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
|