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.

collector.go 1.7 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. package collector
  2. import (
  3. "context"
  4. )
  5. type AiCollector interface {
  6. GetResourceStats(ctx context.Context) (*ResourceStats, error)
  7. GetDatasetsSpecs(ctx context.Context) ([]*DatasetsSpecs, error)
  8. GetAlgorithms(ctx context.Context) ([]*Algorithm, error)
  9. GetTrainingTaskLog(ctx context.Context, taskId string, instanceNum string) (string, error)
  10. GetTrainingTask(ctx context.Context, taskId string) (*Task, error)
  11. DownloadAlgorithmCode(ctx context.Context, resourceType string, card string, taskType string, dataset string, algorithm string) (string, error)
  12. UploadAlgorithmCode(ctx context.Context, resourceType string, card string, taskType string, dataset string, algorithm string, code string) error
  13. GetComputeCards(ctx context.Context) ([]string, error)
  14. GetUserBalance(ctx context.Context) (float64, error)
  15. GetResourceUsage(ctx context.Context) (*ResourceUsage, error)
  16. }
  17. type ResourceUsage struct {
  18. ClusterId string
  19. Usages []*Usage
  20. }
  21. type Usage struct {
  22. Total int64
  23. Type string
  24. Available int64
  25. }
  26. type ResourceStats struct {
  27. ClusterId string
  28. Name string
  29. CpuCoreAvail int64
  30. CpuCoreTotal int64
  31. MemAvail float64
  32. MemTotal float64
  33. DiskAvail float64
  34. DiskTotal float64
  35. GpuAvail int64
  36. GpuTotal int64
  37. CardsAvail []*Card
  38. CpuCoreHours float64
  39. Balance float64
  40. TaskCompleted int64
  41. }
  42. type Card struct {
  43. Platform string
  44. Type string
  45. Name string
  46. TOpsAtFp16 float64
  47. CardHours float64
  48. CardNum int32
  49. }
  50. type DatasetsSpecs struct {
  51. Name string
  52. Size string
  53. }
  54. type Algorithm struct {
  55. Name string
  56. Platform string
  57. TaskType string
  58. }
  59. type Task struct {
  60. Id string
  61. Start string
  62. End string
  63. Status string
  64. }

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.