1
0
mirror of https://github.com/newnius/YAO-scheduler.git synced 2025-12-12 23:36:44 +00:00
Files
YAO-scheduler/src/scheduler.go

42 lines
646 B
Go
Raw Normal View History

2019-07-10 20:40:43 +08:00
package main
type Scheduler interface {
Start()
Schedule(Job)
2020-05-03 00:16:28 +08:00
UpdateProgress(job Job, state State)
2019-07-10 20:40:43 +08:00
2020-04-30 21:22:21 +08:00
AcquireResource(Job, Task, []NodeStatus) NodeStatus
2019-07-10 20:40:43 +08:00
2019-08-01 13:42:53 +08:00
ReleaseResource(Job, NodeStatus)
2019-07-10 20:40:43 +08:00
AcquireNetwork() string
ReleaseNetwork(network string)
QueryState(jobName string) MsgJobStatus
QueryLogs(jobName string, taskName string) MsgLog
Stop(jobName string) MsgStop
ListJobs() MsgJobList
Summary() MsgSummary
2020-04-11 11:38:04 +08:00
Attach(GPU string, job string)
Detach(GPU string, job string)
2020-04-13 18:26:40 +08:00
2020-04-13 18:37:54 +08:00
Enable() bool
2020-04-13 18:26:40 +08:00
2020-04-13 18:37:54 +08:00
Disable() bool
2020-04-13 23:53:38 +08:00
UpdateParallelism(parallelism int) bool
2020-04-30 17:52:52 +08:00
SetShareRatio(ratio float64) bool
SetPreScheduleRatio(ratio float64) bool
2019-07-10 20:40:43 +08:00
}