From e8f0f987ca5d1461ba420d2503b083e5490fcf18 Mon Sep 17 00:00:00 2001 From: liuzx Date: Tue, 9 Aug 2022 14:57:25 +0800 Subject: [PATCH] checkout bootfile --- routers/repo/cloudbrain.go | 8 ++++---- routers/repo/grampus.go | 8 ++++---- routers/repo/modelarts.go | 12 ++++++------ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/routers/repo/cloudbrain.go b/routers/repo/cloudbrain.go index 066008e49..1f33f7023 100755 --- a/routers/repo/cloudbrain.go +++ b/routers/repo/cloudbrain.go @@ -306,8 +306,8 @@ func CloudBrainCreate(ctx *context.Context, form auth.CreateCloudBrainForm) { command := cloudbrain.GetCloudbrainDebugCommand() if jobType == string(models.JobTypeTrain) { - bootFileExict, err := ctx.Repo.FileExists(bootFile, branchName) - if err != nil || !bootFileExict { + bootFileExist, err := ctx.Repo.FileExists(bootFile, branchName) + if err != nil || !bootFileExist { log.Error("Get bootfile error:", err, ctx.Data["MsgID"]) cloudBrainNewDataPrepare(ctx) ctx.RenderWithErr(ctx.Tr("repo.cloudbrain_bootfile_err"), tpl, &form) @@ -459,8 +459,8 @@ func CloudBrainInferenceJobCreate(ctx *context.Context, form auth.CreateCloudBra return } - bootFileExict, err := ctx.Repo.FileExists(bootFile, branchName) - if err != nil || !bootFileExict { + bootFileExist, err := ctx.Repo.FileExists(bootFile, branchName) + if err != nil || !bootFileExist { log.Error("Get bootfile error:", err, ctx.Data["MsgID"]) cloudBrainNewDataPrepare(ctx) ctx.RenderWithErr(ctx.Tr("repo.cloudbrain_bootfile_err"), tpl, &form) diff --git a/routers/repo/grampus.go b/routers/repo/grampus.go index c31143a33..133f270f2 100755 --- a/routers/repo/grampus.go +++ b/routers/repo/grampus.go @@ -215,8 +215,8 @@ func GrampusTrainJobGpuCreate(ctx *context.Context, form auth.CreateGrampusTrain return } - bootFileExict, err := ctx.Repo.FileExists(bootFile, branchName) - if err != nil || !bootFileExict { + bootFileExist, err := ctx.Repo.FileExists(bootFile, branchName) + if err != nil || !bootFileExist { log.Error("Get bootfile error:", err, ctx.Data["MsgID"]) grampusTrainJobNewDataPrepare(ctx, grampus.ProcessorTypeGPU) ctx.RenderWithErr(ctx.Tr("repo.cloudbrain_bootfile_err"), tplGrampusTrainJobGPUNew, &form) @@ -407,8 +407,8 @@ func GrampusTrainJobNpuCreate(ctx *context.Context, form auth.CreateGrampusTrain return } - bootFileExict, err := ctx.Repo.FileExists(bootFile, branchName) - if err != nil || !bootFileExict { + bootFileExist, err := ctx.Repo.FileExists(bootFile, branchName) + if err != nil || !bootFileExist { log.Error("Get bootfile error:", err, ctx.Data["MsgID"]) grampusTrainJobNewDataPrepare(ctx, grampus.ProcessorTypeNPU) ctx.RenderWithErr(ctx.Tr("repo.cloudbrain_bootfile_err"), tplGrampusTrainJobNPUNew, &form) diff --git a/routers/repo/modelarts.go b/routers/repo/modelarts.go index a0dfa6d05..92236d235 100755 --- a/routers/repo/modelarts.go +++ b/routers/repo/modelarts.go @@ -1117,8 +1117,8 @@ func TrainJobCreate(ctx *context.Context, form auth.CreateModelArtsTrainJobForm) return } - bootFileExict, err := ctx.Repo.FileExists(bootFile, branchName) - if err != nil || !bootFileExict { + bootFileExist, err := ctx.Repo.FileExists(bootFile, branchName) + if err != nil || !bootFileExist { log.Error("Get bootfile error:", err) trainJobErrorNewDataPrepare(ctx, form) ctx.RenderWithErr(ctx.Tr("repo.cloudbrain_bootfile_err"), tplModelArtsTrainJobNew, &form) @@ -1422,8 +1422,8 @@ func TrainJobCreateVersion(ctx *context.Context, form auth.CreateModelArtsTrainJ return } - bootFileExict, err := ctx.Repo.FileExists(bootFile, branchName) - if err != nil || !bootFileExict { + bootFileExist, err := ctx.Repo.FileExists(bootFile, branchName) + if err != nil || !bootFileExist { log.Error("Get bootfile error:", err) versionErrorDataPrepare(ctx, form) ctx.RenderWithErr(ctx.Tr("repo.cloudbrain_bootfile_err"), tplModelArtsTrainJobVersionNew, &form) @@ -2076,8 +2076,8 @@ func InferenceJobCreate(ctx *context.Context, form auth.CreateModelArtsInference return } - bootFileExict, err := ctx.Repo.FileExists(bootFile, branchName) - if err != nil || !bootFileExict { + bootFileExist, err := ctx.Repo.FileExists(bootFile, branchName) + if err != nil || !bootFileExist { log.Error("Get bootfile error:", err) inferenceJobErrorNewDataPrepare(ctx, form) ctx.RenderWithErr(ctx.Tr("repo.cloudbrain_bootfile_err"), tplModelArtsInferenceJobNew, &form)