added DeployTask apis

Former-commit-id: a9b5c42c5ff1b390c784f82e730e76405319ede0
This commit is contained in:
tzwang 2024-07-31 09:41:02 +08:00
parent 8c20e3afea
commit a152ee7576
4 changed files with 35 additions and 1 deletions

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
}
)

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(

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"
)

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,