Browse Source

Merge branch 'liuzx_trainjob' of https://git.openi.org.cn/OpenI/aiforge into liuzx_trainjob

tags/v1.21.11.1
zhoupzh 4 years ago
parent
commit
6972555b51
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      modules/modelarts/resty.go

+ 5
- 1
modules/modelarts/resty.go View File

@@ -366,10 +366,14 @@ sendjob:
return &result, fmt.Errorf("json.Unmarshal failed(%s): %v", res.String(), err.Error())
}
log.Error("createTrainJob failed(%d):%s(%s)", res.StatusCode(), temp.ErrorCode, temp.ErrorMsg)
if res.StatusCode() == 400 {
if temp.ErrorCode == "ModelArts.0404" {
temp.ErrorCode = "0404"
temp.ErrorMsg = "启动文件未找到!"
}
if temp.ErrorCode == "ModelArts.0104" {
temp.ErrorCode = "0104"
temp.ErrorMsg = "运行参数错误!"
}
return &result, fmt.Errorf("createTrainJob failed(%d):%s(%s)", res.StatusCode(), temp.ErrorCode, temp.ErrorMsg)
}



Loading…
Cancel
Save