Merge pull request 'updated deployinstancelist logics' (#303) from tzwang/pcm-coordinator:master into master
Former-commit-id: 6b1f3a9b6a2606cd448994089d84620c0c8ca107
This commit is contained in:
commit
985f2ef6e5
|
@ -38,6 +38,14 @@ func (l *DeployInstanceListLogic) DeployInstanceList(req *types.DeployInstanceLi
|
|||
return nil, tx.Error
|
||||
}
|
||||
|
||||
if len(tasklist) == 0 {
|
||||
resp.List = nil
|
||||
resp.PageSize = req.PageSize
|
||||
resp.PageNum = req.PageNum
|
||||
resp.Total = 0
|
||||
return
|
||||
}
|
||||
|
||||
//count total
|
||||
var total int64
|
||||
err = tx.Count(&total).Error
|
||||
|
|
|
@ -70,12 +70,6 @@ func removeItem(items *[]*models.AiDeployInstanceTask, id int64) {
|
|||
if len(*items) == 0 {
|
||||
return
|
||||
}
|
||||
if len(*items) == 1 {
|
||||
if (*items)[0].Id == id {
|
||||
(*items) = nil
|
||||
return
|
||||
}
|
||||
}
|
||||
for i := len(*items) - 1; i >= 0; i-- {
|
||||
if (*items)[i].Id == id {
|
||||
*items = append((*items)[:i], (*items)[i+1:]...)
|
||||
|
|
|
@ -80,7 +80,7 @@ var (
|
|||
}
|
||||
ModelTypeMap = map[string][]string{
|
||||
"image_classification": {"imagenet_resnet50"},
|
||||
"text_to_text": {"chatGLM_6B"},
|
||||
"text_to_text": {"ChatGLM-6B"},
|
||||
"image_to_text": {"blip-image-captioning-base"},
|
||||
"text_to_image": {"stable-diffusion-xl-base-1.0"},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue