Browse Source

added DeployTask apis

Former-commit-id: a9b5c42c5f
pull/278/head
tzwang 1 year ago
parent
commit
a152ee7576
4 changed files with 35 additions and 1 deletions
  1. +24
    -0
      desc/inference/inference.api
  2. +9
    -0
      desc/pcm.api
  3. +1
    -1
      internal/scheduler/service/inference/imageInference/imageToText.go
  4. +1
    -0
      internal/storeLink/storeLink.go

+ 24
- 0
desc/inference/inference.api View File

@@ -120,4 +120,28 @@ type (
Running int32 `json:"running"`
Total int32 `json:"total"`
}

StartAllByDeployTaskIdReq {
Id string `form:"id"`
}

StartAllByDeployTaskIdResp {

}

StopAllByDeployTaskIdReq {
Id string `form:"id"`
}

StopAllByDeployTaskIdResp {

}

GetDeployTasksReq {
PageInfo
}

GetDeployTasksResp {
PageResult
}
)

+ 9
- 0
desc/pcm.api View File

@@ -959,6 +959,15 @@ service pcm {

@handler InferenceTaskStatHandler
get /inference/taskStat (InferenceTaskStatReq) returns (InferenceTaskStatResp)

@handler StartAllByDeployTaskId
post /inference/startAllById (StartAllByDeployTaskIdReq) returns (StartAllByDeployTaskIdResp)

@handler StopAllByDeployTaskId
post /inference/stopAllById (StopAllByDeployTaskIdReq) returns (StopAllByDeployTaskIdResp)

@handler GetDeployTasks
get /inference/getDeployTasks (GetDeployTasksReq) returns (GetDeployTasksResp)
}

@server(


+ 1
- 1
internal/scheduler/service/inference/imageInference/imageToText.go View File

@@ -3,7 +3,7 @@ package imageInference
import "gitlink.org.cn/JointCloud/pcm-coordinator/internal/scheduler/service/inference"

const (
IMAGETOTEXT = "image-to-text"
IMAGETOTEXT = "image"
IMAGETOTEXT_AiTYPE = "13"
)



+ 1
- 0
internal/storeLink/storeLink.go View File

@@ -81,6 +81,7 @@ var (
ModelTypeMap = map[string][]string{
"image_classification": {"imagenet_resnet50"},
"text_to_text": {"chatGLM_6B"},
"image_to_text": {"blip-image-captioning-base"},
}
AITYPE = map[string]string{
"1": OCTOPUS,


Loading…
Cancel
Save