From b758c361038c6306b2c1809b826a727a4c8150a4 Mon Sep 17 00:00:00 2001 From: lewis <747342561@qq.com> Date: Mon, 1 Nov 2021 17:17:02 +0800 Subject: [PATCH] delete org limit --- routers/repo/modelarts.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/routers/repo/modelarts.go b/routers/repo/modelarts.go index a679e8a25..86287e0b6 100755 --- a/routers/repo/modelarts.go +++ b/routers/repo/modelarts.go @@ -614,17 +614,17 @@ func TrainJobCreate(ctx *context.Context, form auth.CreateModelArtsTrainJobForm) logObsPath := "/" + setting.Bucket + modelarts.JobPath + jobName + modelarts.LogPath dataPath := "/" + setting.Bucket + "/" + setting.BasePath + path.Join(uuid[0:1], uuid[1:2]) + "/" + uuid + "/" - can, err := canUserCreateTrainJob(ctx.User.ID) - if err != nil { - ctx.ServerError("canUserCreateTrainJob", err) - return - } - - if !can { - log.Error("the user can not create train-job") - ctx.RenderWithErr("the user can not create train-job", tplModelArtsTrainJobNew, &form) - return - } + //can, err := canUserCreateTrainJob(ctx.User.ID) + //if err != nil { + // ctx.ServerError("canUserCreateTrainJob", err) + // return + //} + // + //if !can { + // log.Error("the user can not create train-job") + // ctx.RenderWithErr("the user can not create train-job", tplModelArtsTrainJobNew, &form) + // return + //} //param check if err := paramCheckCreateTrainJob(form); err != nil { @@ -735,7 +735,7 @@ func TrainJobCreate(ctx *context.Context, form auth.CreateModelArtsTrainJobForm) Parameters: param, } - err = modelarts.GenerateTrainJob(ctx, req) + err := modelarts.GenerateTrainJob(ctx, req) if err != nil { log.Error("GenerateTrainJob failed:%v", err.Error()) ctx.RenderWithErr(err.Error(), tplModelArtsTrainJobNew, &form)