| @@ -93,7 +93,7 @@ func grampusTrainJobNewDataPrepare(ctx *context.Context, processType string) err | |||||
| } | } | ||||
| func grampusParamCheckCreateTrainJob(form auth.CreateGrampusTrainJobForm) error { | func grampusParamCheckCreateTrainJob(form auth.CreateGrampusTrainJobForm) error { | ||||
| if !strings.HasSuffix(form.BootFile, ".py") { | |||||
| if !strings.HasSuffix(strings.TrimSpace(form.BootFile), ".py") { | |||||
| log.Error("the boot file(%s) must be a python file", form.BootFile) | log.Error("the boot file(%s) must be a python file", form.BootFile) | ||||
| return errors.New("启动文件必须是python文件") | return errors.New("启动文件必须是python文件") | ||||
| } | } | ||||
| @@ -111,7 +111,7 @@ func GrampusTrainJobGpuCreate(ctx *context.Context, form auth.CreateGrampusTrain | |||||
| jobName := util.ConvertDisplayJobNameToJobName(displayJobName) | jobName := util.ConvertDisplayJobNameToJobName(displayJobName) | ||||
| uuid := form.Attachment | uuid := form.Attachment | ||||
| description := form.Description | description := form.Description | ||||
| bootFile := form.BootFile | |||||
| bootFile := strings.TrimSpace(form.BootFile) | |||||
| params := form.Params | params := form.Params | ||||
| repo := ctx.Repo.Repository | repo := ctx.Repo.Repository | ||||
| codeLocalPath := setting.JobPath + jobName + cloudbrain.CodeMountPath + "/" | codeLocalPath := setting.JobPath + jobName + cloudbrain.CodeMountPath + "/" | ||||
| @@ -262,7 +262,7 @@ func GrampusTrainJobNpuCreate(ctx *context.Context, form auth.CreateGrampusTrain | |||||
| jobName := util.ConvertDisplayJobNameToJobName(displayJobName) | jobName := util.ConvertDisplayJobNameToJobName(displayJobName) | ||||
| uuid := form.Attachment | uuid := form.Attachment | ||||
| description := form.Description | description := form.Description | ||||
| bootFile := form.BootFile | |||||
| bootFile := strings.TrimSpace(form.BootFile) | |||||
| params := form.Params | params := form.Params | ||||
| repo := ctx.Repo.Repository | repo := ctx.Repo.Repository | ||||
| codeLocalPath := setting.JobPath + jobName + modelarts.CodePath | codeLocalPath := setting.JobPath + jobName + modelarts.CodePath | ||||