You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

inference.api 3.8 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. syntax = "v1"
  2. type (
  3. /******************image inference*************************/
  4. ModelTypesResp {
  5. ModelTypes []string `json:"types"`
  6. }
  7. ModelNamesReq {
  8. Type string `form:"type"`
  9. }
  10. ModelNamesResp {
  11. ModelNames []string `json:"models"`
  12. }
  13. /******************image inference*************************/
  14. ImageInferenceReq {
  15. TaskName string `form:"taskName"`
  16. TaskDesc string `form:"taskDesc"`
  17. ModelName string `form:"modelName"`
  18. ModelType string `form:"modelType"`
  19. AdapterId string `form:"adapterId"`
  20. AiClusterIds []string `form:"aiClusterIds,optional"`
  21. ResourceType string `form:"resourceType,optional"`
  22. ComputeCard string `form:"card,optional"`
  23. Strategy string `form:"strategy"`
  24. StaticWeightMap map[string]int32 `form:"staticWeightMap,optional"`
  25. Params []string `form:"params,optional"`
  26. Envs []string `form:"envs,optional"`
  27. Cmd string `form:"cmd,optional"`
  28. Replica int32 `form:"replicas,optional"`
  29. }
  30. ImageInferenceResp {
  31. InferResults []*ImageResult `json:"result"`
  32. }
  33. ImageResult {
  34. ClusterId string `json:"clusterId"`
  35. ClusterName string `json:"clusterName"`
  36. ImageName string `json:"imageName"`
  37. Card string `json:"card"`
  38. ImageResult string `json:"imageResult"`
  39. }
  40. InferenceTaskDetailReq{
  41. taskId int64 `form:"taskId"`
  42. }
  43. InferenceTaskDetailResp{
  44. InferenceResults []InferenceResult `json:"data"`
  45. Code int32 `json:"code,omitempty"`
  46. Msg string `json:"msg,omitempty"`
  47. }
  48. InferenceResult{
  49. imageName string `json:"imageName"`
  50. TaskName string `json:"taskName"`
  51. TaskAiName string `json:"taskAiName"`
  52. result string `json:"result"`
  53. card string `json:"card"`
  54. clusterName string `json:"clusterName"`
  55. }
  56. /******************TextToText inference*************************/
  57. TextToTextInferenceReq{
  58. TaskName string `form:"taskName"`
  59. TaskDesc string `form:"taskDesc"`
  60. ModelName string `form:"modelName"`
  61. ModelType string `form:"modelType"`
  62. AdapterId string `form:"adapterId"`
  63. AiClusterIds []string `form:"aiClusterIds"`
  64. }
  65. TextToTextInferenceResp{
  66. }
  67. /******************Deploy instance*************************/
  68. DeployInstanceListReq{
  69. PageInfo
  70. }
  71. DeployInstanceListResp {
  72. PageResult
  73. }
  74. StartDeployInstanceReq {
  75. AdapterId string `form:"adapterId"`
  76. ClusterId string `form:"clusterId"`
  77. Id string `form:"id"`
  78. InstanceId string `form:"instanceId"`
  79. }
  80. StartDeployInstanceResp {
  81. }
  82. StopDeployInstanceReq {
  83. AdapterId string `form:"adapterId"`
  84. ClusterId string `form:"clusterId"`
  85. Id string `form:"id"`
  86. InstanceId string `form:"instanceId"`
  87. }
  88. StopDeployInstanceResp {
  89. }
  90. DeployInstanceStatReq {
  91. }
  92. DeployInstanceStatResp {
  93. Running int32 `json:"running"`
  94. Total int32 `json:"total"`
  95. }
  96. InferenceTaskStatReq {}
  97. InferenceTaskStatResp {
  98. Running int32 `json:"running"`
  99. Total int32 `json:"total"`
  100. }
  101. StartAllByDeployTaskIdReq {
  102. Id string `json:"deployTaskId"`
  103. }
  104. StartAllByDeployTaskIdResp {
  105. }
  106. StopAllByDeployTaskIdReq {
  107. Id string `json:"deployTaskId"`
  108. }
  109. StopAllByDeployTaskIdResp {
  110. }
  111. GetDeployTasksReq {
  112. PageInfo
  113. }
  114. GetDeployTasksResp {
  115. PageResult
  116. }
  117. )

PCM is positioned as Software stack over Cloud, aiming to build the standards and ecology of heterogeneous cloud collaboration for JCC in a non intrusive and autonomous peer-to-peer manner.