updated imageinference api

Former-commit-id: 37f69eb747ca83ea4f303a71d77c9621efd05472
This commit is contained in:
tzwang 2024-06-19 19:22:46 +08:00
parent cfecebc3b8
commit 5a0d3a9428
2 changed files with 40 additions and 26 deletions

View File

@ -3,38 +3,33 @@ syntax = "v1"
type (
InferOption {
TaskName string `json:"taskName"`
// AdapterId string `json:"adapterId"`
// AiClusterIds []string `json:"aiClusterIds"`
// ResourceType string `json:"resourceType"`
// ComputeCard string `json:"card"`
// Tops float64 `json:"Tops,optional"`
// TaskType string `json:"taskType"`
// Datasets string `json:"datasets"`
// Algorithm string `json:"algorithm"`
// Strategy string `json:"strategy"`
// StaticWeightMap map[string]int32 `json:"staticWeightMap,optional"`
// Params []string `json:"params,optional"`
// Envs []string `json:"envs,optional"`
// Cmd string `json:"cmd,optional"`
// Replica int32 `json:"replicas"`
TaskType string `json:"taskType"`
AdapterId string `json:"adapterId"`
AiClusterIds []string `json:"aiClusterIds"`
ResourceType string `json:"resourceType"`
ComputeCard string `json:"card"`
Strategy string `json:"strategy"`
StaticWeightMap map[string]int32 `json:"staticWeightMap,optional"`
Params []string `json:"params,optional"`
Envs []string `json:"envs,optional"`
Cmd string `json:"cmd,optional"`
Replica int32 `json:"replicas,optional"`
}
/******************image inference*************************/
ImageInferenceReq {
InferOption *InferOption `json:"inferOption,optional"`
Images []string `form:"images"`
}
ImageInferenceResp {
InferResults []*ImageResult `json:"result"`
}
// InferResult {
// ClusterId string `json:"clusterId"`
// TaskId string `json:"taskId"`
// Card string `json:"card"`
// Strategy string `json:"strategy"`
// JobId string `json:"jobId"`
// Replica int32 `json:"replica"`
// Msg string `json:"msg"`
// }
ImageResult {
ClusterId string `json:"clusterId"`
ClusterName string `json:"clusterName"`
ImageName string `json:"imageName"`
Card string `json:"card"`
ImageResult string `json:"imageResult"`
}
)

View File

@ -5881,12 +5881,31 @@ type Category struct {
type InferOption struct {
TaskName string `json:"taskName"`
TaskType string `json:"taskType"`
AdapterId string `json:"adapterId"`
AiClusterIds []string `json:"aiClusterIds"`
ResourceType string `json:"resourceType"`
ComputeCard string `json:"card"`
Strategy string `json:"strategy"`
StaticWeightMap map[string]int32 `json:"staticWeightMap,optional"`
Params []string `json:"params,optional"`
Envs []string `json:"envs,optional"`
Cmd string `json:"cmd,optional"`
Replica int32 `json:"replicas,optional"`
}
type ImageInferenceReq struct {
InferOption *InferOption `json:"inferOption,optional"`
Images []string `form:"images"`
}
type ImageInferenceResp struct {
InferResults []*ImageResult `json:"result"`
}
type ImageResult struct {
ClusterId string `json:"clusterId"`
ClusterName string `json:"clusterName"`
ImageName string `json:"imageName"`
Card string `json:"card"`
ImageResult string `json:"imageResult"`
}