|
|
|
@@ -1147,7 +1147,7 @@ func TrainJobCreate(ctx *context.Context, form auth.CreateModelArtsTrainJobForm) |
|
|
|
if err := downloadCode(repo, codeLocalPath, branch_name); err != nil { |
|
|
|
log.Error("downloadCode failed, server timed out: %s (%v)", repo.FullName(), err) |
|
|
|
trainJobErrorNewDataPrepare(ctx, form) |
|
|
|
ctx.RenderWithErr("Create task failed, server timed out", tplModelArtsTrainJobNew, &form) |
|
|
|
ctx.RenderWithErr(ctx.Tr("cloudbrain.load_code_failed"), tplModelArtsTrainJobNew, &form) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
@@ -1171,7 +1171,7 @@ func TrainJobCreate(ctx *context.Context, form auth.CreateModelArtsTrainJobForm) |
|
|
|
// if err := uploadCodeToObs(codeLocalPath, jobName, parentDir); err != nil { |
|
|
|
log.Error("Failed to uploadCodeToObs: %s (%v)", repo.FullName(), err) |
|
|
|
trainJobErrorNewDataPrepare(ctx, form) |
|
|
|
ctx.RenderWithErr("Failed to uploadCodeToObs", tplModelArtsTrainJobNew, &form) |
|
|
|
ctx.RenderWithErr(ctx.Tr("cloudbrain.load_code_failed"), tplModelArtsTrainJobNew, &form) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
@@ -1426,7 +1426,7 @@ func TrainJobCreateVersion(ctx *context.Context, form auth.CreateModelArtsTrainJ |
|
|
|
if err := downloadCode(repo, codeLocalPath, branch_name); err != nil { |
|
|
|
log.Error("Failed git clone repo to local(!: %s (%v)", repo.FullName(), err) |
|
|
|
versionErrorDataPrepare(ctx, form) |
|
|
|
ctx.RenderWithErr("Failed git clone repo to local!", tplModelArtsTrainJobVersionNew, &form) |
|
|
|
ctx.RenderWithErr(ctx.Tr("cloudbrain.load_code_failed"), tplModelArtsTrainJobVersionNew, &form) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
@@ -1451,7 +1451,7 @@ func TrainJobCreateVersion(ctx *context.Context, form auth.CreateModelArtsTrainJ |
|
|
|
if err := uploadCodeToObs(codeLocalPath, jobName, parentDir); err != nil { |
|
|
|
log.Error("Failed to uploadCodeToObs: %s (%v)", repo.FullName(), err) |
|
|
|
versionErrorDataPrepare(ctx, form) |
|
|
|
ctx.RenderWithErr("Failed to uploadCodeToObs", tplModelArtsTrainJobVersionNew, &form) |
|
|
|
ctx.RenderWithErr(ctx.Tr("cloudbrain.load_code_failed"), tplModelArtsTrainJobVersionNew, &form) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
@@ -2090,7 +2090,7 @@ func InferenceJobCreate(ctx *context.Context, form auth.CreateModelArtsInference |
|
|
|
if err := downloadCode(repo, codeLocalPath, branch_name); err != nil { |
|
|
|
log.Error("Create task failed, server timed out: %s (%v)", repo.FullName(), err) |
|
|
|
inferenceJobErrorNewDataPrepare(ctx, form) |
|
|
|
ctx.RenderWithErr("Create task failed, server timed out", tplModelArtsInferenceJobNew, &form) |
|
|
|
ctx.RenderWithErr(ctx.Tr("cloudbrain.load_code_failed"), tplModelArtsInferenceJobNew, &form) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
@@ -2112,7 +2112,7 @@ func InferenceJobCreate(ctx *context.Context, form auth.CreateModelArtsInference |
|
|
|
if err := uploadCodeToObs(codeLocalPath, jobName, ""); err != nil { |
|
|
|
log.Error("Failed to uploadCodeToObs: %s (%v)", repo.FullName(), err) |
|
|
|
inferenceJobErrorNewDataPrepare(ctx, form) |
|
|
|
ctx.RenderWithErr("Failed to uploadCodeToObs", tplModelArtsInferenceJobNew, &form) |
|
|
|
ctx.RenderWithErr(ctx.Tr("cloudbrain.load_code_failed"), tplModelArtsInferenceJobNew, &form) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
|