Browse Source

checkout bootfile

tags/v1.22.8.1^2
liuzx 3 years ago
parent
commit
e8f0f987ca
3 changed files with 14 additions and 14 deletions
  1. +4
    -4
      routers/repo/cloudbrain.go
  2. +4
    -4
      routers/repo/grampus.go
  3. +6
    -6
      routers/repo/modelarts.go

+ 4
- 4
routers/repo/cloudbrain.go View File

@@ -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)


+ 4
- 4
routers/repo/grampus.go View File

@@ -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)


+ 6
- 6
routers/repo/modelarts.go View File

@@ -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)


Loading…
Cancel
Save