-
Notifications
You must be signed in to change notification settings - Fork 0
/
training.go
50 lines (43 loc) · 1.3 KB
/
training.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package types
type JobInfo struct {
// The name of the training job
Name string `json:"name"`
// The namespace of the training job
Namespace string `json:"namespace"`
// The time of the training job
Duration string `json:"duration"`
// The status of the training Job
Status JobStatus `json:"status"`
// The training type of the training job
Trainer string `json:"trainer"`
// The tensorboard of the training job
Tensorboard string `json:"tensorboard,omitempty"`
// The name of the chief Instance
ChiefName string `json:"chiefName" yaml:"chiefName"`
// The instances under the training job
Instances []Instance `json:"instances"`
}
// all the kinds of JobStatus
type JobStatus string
const (
// JobPending means the job is pending
JobPending JobStatus = "PENDING"
// JobRunning means the job is running
JobRunning JobStatus = "RUNNING"
// JobSucceeded means the job is Succeeded
JobSucceeded JobStatus = "SUCCEEDED"
// JobFailed means the job is failed
JobFailed JobStatus = "FAILED"
)
type Instance struct {
// the status of of instance
Status string `json:"status"`
// the name of instance
Name string `json:"name"`
// the age of instance
Age string `json:"age"`
// the node instance runs on
Node string `json:"node"`
// the instance is chief or not
IsChief bool `json:"chief" yaml:"chief"`
}