|
|
|
@@ -6,6 +6,7 @@ import ( |
|
|
|
"gitlink.org.cn/jcce-pcm/pcm-coordinator/pkg/models" |
|
|
|
"gitlink.org.cn/jcce-pcm/pcm-coordinator/pkg/utils" |
|
|
|
"gitlink.org.cn/jcce-pcm/pcm-participant-modelarts/modelarts" |
|
|
|
"strconv" |
|
|
|
"strings" |
|
|
|
) |
|
|
|
|
|
|
|
@@ -43,8 +44,8 @@ func (o *ModelArtsLink) DeleteImage(imageId string) (interface{}, error) { |
|
|
|
func (o *ModelArtsLink) QueryImageList() (interface{}, error) { |
|
|
|
// modelArts获取镜像列表 |
|
|
|
req := &modelarts.ListRepoReq{ |
|
|
|
Offset: string(o.pageIndex), |
|
|
|
Limit: string(o.pageSize), |
|
|
|
Offset: "0", |
|
|
|
Limit: strconv.Itoa(int(o.pageSize)), |
|
|
|
} |
|
|
|
resp, err := o.svcCtx.ModelArtsImgRpc.ListReposDetails(o.ctx, req) |
|
|
|
if err != nil { |
|
|
|
@@ -114,7 +115,7 @@ func (o *ModelArtsLink) QueryTask(taskId string) (interface{}, error) { |
|
|
|
} |
|
|
|
|
|
|
|
//转换成统一返回类型 |
|
|
|
taskResp, err := ConvertType[modelarts.JobResponse](resp, nil) |
|
|
|
taskResp, err := ConvertType[modelarts.JobResponse](resp, o.participant) |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
|
} |
|
|
|
|