|
@@ -1789,11 +1789,7 @@ func paramCheckCreateTrainJob(form auth.CreateModelArtsTrainJobForm) error { |
|
|
log.Error("the boot file(%s) must be a python file", strings.TrimSpace(form.BootFile)) |
|
|
log.Error("the boot file(%s) must be a python file", strings.TrimSpace(form.BootFile)) |
|
|
return errors.New("启动文件必须是python文件") |
|
|
return errors.New("启动文件必须是python文件") |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if form.WorkServerNumber > 2 || form.WorkServerNumber < 1 { |
|
|
|
|
|
log.Error("the WorkServerNumber(%d) must be in (1,2)", form.WorkServerNumber) |
|
|
|
|
|
return errors.New("计算节点数必须在1-2之间") |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if form.BranchName == "" { |
|
|
if form.BranchName == "" { |
|
|
log.Error("the branch must not be null!", form.BranchName) |
|
|
log.Error("the branch must not be null!", form.BranchName) |
|
|
return errors.New("代码分支不能为空!") |
|
|
return errors.New("代码分支不能为空!") |
|
|