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.3 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. }
  19. type IInference interface {
  20. CreateTask() (int64, error)
  21. InferTask(id int64) error
  22. }
  23. type Inference struct {
  24. In IInference
  25. }
  26. type ClusterInferUrl struct {
  27. ClusterName string
  28. ClusterType string
  29. InferUrls []*InferUrl
  30. }
  31. type InferUrl struct {
  32. Url string
  33. Card string
  34. }
  35. type DeployInstance struct {
  36. InstanceName string
  37. InstanceId string
  38. ModelName string
  39. ModelType string
  40. InferCard string
  41. ClusterName string
  42. ClusterType string
  43. Status string
  44. CreatedTime string
  45. }

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.