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.go 1.4 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. package inference
  2. import (
  3. "context"
  4. "gitlink.org.cn/JointCloud/pcm-coordinator/internal/scheduler/schedulers/option"
  5. "mime/multipart"
  6. )
  7. const (
  8. FORWARD_SLASH = "/"
  9. )
  10. type ICluster interface {
  11. GetClusterInferUrl(ctx context.Context, option *option.InferOption) (*ClusterInferUrl, error)
  12. GetInferResult(ctx context.Context, url string, file multipart.File, fileName string) (string, error)
  13. GetInferDeployInstanceList(ctx context.Context) ([]*DeployInstance, error)
  14. StartInferDeployInstance(ctx context.Context, id string) bool
  15. StopInferDeployInstance(ctx context.Context, id string) bool
  16. GetInferDeployInstance(ctx context.Context, id string) (*DeployInstance, error)
  17. CreateInferDeployInstance(ctx context.Context, option *option.InferOption) (string, error)
  18. CheckModelExistence(ctx context.Context, name string, mtype string) bool
  19. }
  20. type IInference interface {
  21. CreateTask() (int64, error)
  22. InferTask(id int64) error
  23. }
  24. type Inference struct {
  25. In IInference
  26. }
  27. type ClusterInferUrl struct {
  28. ClusterName string
  29. ClusterType string
  30. InferUrls []*InferUrl
  31. }
  32. type InferUrl struct {
  33. Url string
  34. Card string
  35. }
  36. type DeployInstance struct {
  37. InstanceName string
  38. InstanceId string
  39. ModelName string
  40. ModelType string
  41. InferCard string
  42. InferUrl string
  43. ClusterName string
  44. ClusterType string
  45. Status string
  46. CreatedTime string
  47. }

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.