|
|
|
@@ -752,7 +752,7 @@ func versionErrorDataPrepare(ctx *context.Context, form auth.CreateModelArtsTrai |
|
|
|
|
|
|
|
func TrainJobCreate(ctx *context.Context, form auth.CreateModelArtsTrainJobForm) { |
|
|
|
ctx.Data["PageIsTrainJob"] = true |
|
|
|
VersionOutputPath := modelarts.GetVersionOutputPathByTotalVersionCount(modelarts.TotalVersionCount) |
|
|
|
VersionOutputPath := modelarts.GetOutputPathByCount(modelarts.TotalVersionCount) |
|
|
|
jobName := form.JobName |
|
|
|
uuid := form.Attachment |
|
|
|
description := form.Description |
|
|
|
@@ -969,7 +969,7 @@ func TrainJobCreateVersion(ctx *context.Context, form auth.CreateModelArtsTrainJ |
|
|
|
ctx.ServerError("GetCloudbrainByJobIDAndIsLatestVersion faild:", err) |
|
|
|
return |
|
|
|
} |
|
|
|
VersionOutputPath := modelarts.GetVersionOutputPathByTotalVersionCount(latestTask.TotalVersionCount + 1) |
|
|
|
VersionOutputPath := modelarts.GetOutputPathByCount(latestTask.TotalVersionCount + 1) |
|
|
|
|
|
|
|
jobName := form.JobName |
|
|
|
uuid := form.Attachment |
|
|
|
@@ -1544,7 +1544,7 @@ func getConfigList(perPage, page int, sortBy, order, searchContent, configType s |
|
|
|
|
|
|
|
func InferenceJobCreate(ctx *context.Context, form auth.CreateModelArtsInferenceJobForm) { |
|
|
|
ctx.Data["PageIsTrainJob"] = true |
|
|
|
VersionOutputPath := modelarts.GetVersionOutputPathByTotalVersionCount(modelarts.TotalVersionCount) |
|
|
|
VersionOutputPath := modelarts.GetOutputPathByCount(modelarts.TotalVersionCount) |
|
|
|
jobName := form.JobName |
|
|
|
uuid := form.Attachment |
|
|
|
description := form.Description |
|
|
|
@@ -1573,6 +1573,13 @@ func InferenceJobCreate(ctx *context.Context, form auth.CreateModelArtsInference |
|
|
|
|
|
|
|
ckptUrl := form.TrainUrl + form.CkptName |
|
|
|
|
|
|
|
if err := paramCheckCreateInferenceJob(form); err != nil { |
|
|
|
log.Error("paramCheckCreateInferenceJob failed:(%v)", err) |
|
|
|
inferenceJobErrorNewDataPrepare(ctx, form) |
|
|
|
ctx.RenderWithErr(err.Error(), tplModelArtsInferenceJobNew, &form) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
count, err := models.GetCloudbrainInferenceJobCountByUserID(ctx.User.ID) |
|
|
|
if err != nil { |
|
|
|
log.Error("GetCloudbrainInferenceJobCountByUserID failed:%v", err, ctx.Data["MsgID"]) |
|
|
|
@@ -1588,13 +1595,6 @@ func InferenceJobCreate(ctx *context.Context, form auth.CreateModelArtsInference |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if err := paramCheckCreateInferenceJob(form); err != nil { |
|
|
|
log.Error("paramCheckCreateInferenceJob failed:(%v)", err) |
|
|
|
inferenceJobErrorNewDataPrepare(ctx, form) |
|
|
|
ctx.RenderWithErr(err.Error(), tplModelArtsInferenceJobNew, &form) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
//todo: del the codeLocalPath |
|
|
|
_, err = ioutil.ReadDir(codeLocalPath) |
|
|
|
if err == nil { |
|
|
|
|