fix:查询列表训练作业和算法接口修改
Former-commit-id: 2464333833f2bfa69ccb16f96ea45ac11794d9e5
This commit is contained in:
parent
47b142dcec
commit
cca80161d8
|
@ -44,7 +44,7 @@ func (l *GetListTrainingJobsLogic) GetListTrainingJobs(in *modelarts.ListTrainin
|
|||
}
|
||||
//根据智算类型判断走华为智算还是南京智算
|
||||
modelArtsType := in.ModelArtsType
|
||||
if modelArtsType == "huawei" {
|
||||
if modelArtsType == l.svcCtx.Config.HaweiModelArtsType {
|
||||
modelArtsUrl := l.svcCtx.Config.ModelArtsUrl
|
||||
url := modelArtsUrl + "v2/" + in.ProjectId + "/training-job-searches?limit=" + limit + "&offset=" + offset
|
||||
reqByte, err := json.Marshal(in)
|
||||
|
@ -66,7 +66,7 @@ func (l *GetListTrainingJobsLogic) GetListTrainingJobs(in *modelarts.ListTrainin
|
|||
resp.Code = 400
|
||||
resp.Msg = "Failure"
|
||||
}
|
||||
} else if modelArtsType == "nanjing" {
|
||||
} else if modelArtsType == l.svcCtx.Config.NanjingModelArtsType {
|
||||
AK := l.svcCtx.Config.AK
|
||||
SK := l.svcCtx.Config.SK
|
||||
NanjingModelArtsUrl := l.svcCtx.Config.NanjingModelArtsUrl
|
||||
|
|
|
@ -44,7 +44,7 @@ func (l *ListAlgorithmsLogic) ListAlgorithms(in *modelarts.ListAlgorithmsReq) (*
|
|||
//根据智算类型判断走华为智算还是南京智算
|
||||
modelArtsType := in.ModelArtsType
|
||||
|
||||
if modelArtsType == "huawei" {
|
||||
if modelArtsType == l.svcCtx.Config.HaweiModelArtsType {
|
||||
modelArtsUrl := l.svcCtx.Config.ModelArtsUrl
|
||||
url := modelArtsUrl + in.ProjectId + "v2/" + "/algorithms?offset=" + offset + "&" + "limit=" + limit
|
||||
token := common.GetToken()
|
||||
|
@ -62,7 +62,7 @@ func (l *ListAlgorithmsLogic) ListAlgorithms(in *modelarts.ListAlgorithmsReq) (*
|
|||
resp.Msg = "Failure"
|
||||
|
||||
}
|
||||
} else if modelArtsType == "nanjing" {
|
||||
} else if modelArtsType == l.svcCtx.Config.NanjingModelArtsType {
|
||||
AK := l.svcCtx.Config.AK
|
||||
SK := l.svcCtx.Config.SK
|
||||
NanjingModelArtsUrl := l.svcCtx.Config.NanjingModelArtsUrl
|
||||
|
|
Loading…
Reference in New Issue