| @@ -1471,8 +1471,8 @@ func obsMkdir(dir string) error { | |||||
| } | } | ||||
| func paramCheckCreateTrainJob(form auth.CreateModelArtsTrainJobForm) error { | func paramCheckCreateTrainJob(form auth.CreateModelArtsTrainJobForm) error { | ||||
| if !strings.HasSuffix(form.BootFile, ".py") { | |||||
| log.Error("the boot file(%s) must be a python file", form.BootFile) | |||||
| if !strings.HasSuffix(strings.TrimSpace(form.BootFile), ".py") { | |||||
| log.Error("the boot file(%s) must be a python file", strings.TrimSpace(form.BootFile)) | |||||
| return errors.New("启动文件必须是python文件") | return errors.New("启动文件必须是python文件") | ||||
| } | } | ||||
| @@ -1489,8 +1489,8 @@ func paramCheckCreateTrainJob(form auth.CreateModelArtsTrainJobForm) error { | |||||
| } | } | ||||
| func paramCheckCreateInferenceJob(form auth.CreateModelArtsInferenceJobForm) error { | func paramCheckCreateInferenceJob(form auth.CreateModelArtsInferenceJobForm) error { | ||||
| if !strings.HasSuffix(form.BootFile, ".py") { | |||||
| log.Error("the boot file(%s) must be a python file", form.BootFile) | |||||
| if !strings.HasSuffix(strings.TrimSpace(form.BootFile), ".py") { | |||||
| log.Error("the boot file(%s) must be a python file", strings.TrimSpace(form.BootFile)) | |||||
| return errors.New("启动文件必须是python文件") | return errors.New("启动文件必须是python文件") | ||||
| } | } | ||||