From a152ee757621b7736056b3ffd5aaee64c0543a64 Mon Sep 17 00:00:00 2001 From: tzwang Date: Wed, 31 Jul 2024 09:41:02 +0800 Subject: [PATCH] added DeployTask apis Former-commit-id: a9b5c42c5ff1b390c784f82e730e76405319ede0 --- desc/inference/inference.api | 24 +++++++++++++++++++ desc/pcm.api | 9 +++++++ .../inference/imageInference/imageToText.go | 2 +- internal/storeLink/storeLink.go | 1 + 4 files changed, 35 insertions(+), 1 deletion(-) diff --git a/desc/inference/inference.api b/desc/inference/inference.api index 3ed80836..a0b17940 100644 --- a/desc/inference/inference.api +++ b/desc/inference/inference.api @@ -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 + } ) diff --git a/desc/pcm.api b/desc/pcm.api index db00def6..e657459a 100644 --- a/desc/pcm.api +++ b/desc/pcm.api @@ -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( diff --git a/internal/scheduler/service/inference/imageInference/imageToText.go b/internal/scheduler/service/inference/imageInference/imageToText.go index 84d10643..bcf2a61b 100644 --- a/internal/scheduler/service/inference/imageInference/imageToText.go +++ b/internal/scheduler/service/inference/imageInference/imageToText.go @@ -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" ) diff --git a/internal/storeLink/storeLink.go b/internal/storeLink/storeLink.go index c98ebc7a..a59591ca 100644 --- a/internal/storeLink/storeLink.go +++ b/internal/storeLink/storeLink.go @@ -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,