-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtraining-data.go
66 lines (62 loc) · 2.16 KB
/
training-data.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package main
// global msg used to recv or send
type msg struct {
rm *recvMsg
sm *sendMsg
socketmsg *clientsocketmsg
cltmp *Client
}
// clientsocket send msg
type clientsocketmsg struct {
Uid int `json:"uid"`
Tid int `json:"tid"`
StatusId int `json:"statusId"`
PodName string `json:"podName"`
}
//--------------------------------------------------接受消息--------------------------------------------------
type recvMsg struct {
Type int `json:"type"`
Admin bool `json:"admin"`
Content *recvMsgContent `json:"content"`
RandomName string
FtpFileName string
}
type recvMsgContent struct {
IDs *Ids `json:"ids"`
OriginalModelUrl string `json:"originalModelUrl"`
ContinuousModelUrl string `json:"continuousModelUrl"`
ModelName string `json:"modelName"`
ResourceType string `json:"resourceType"`
SelectedNodes *[]selectNodes `json:"selectedNodes"`
ModelType int `json:"modelType"`
Command string `json:"command"`
FrameworkType int `json:"frameworkType"`
ToolBoxName string `json:"toolBoxName"`
Params string `json:"params"`
SelectedDataset string `json:"selectedDataset"`
ImageName string `json:"imageName"`
DistributingMethod int `json:"distributingMethod"`
CommandBox string `json:"cmd"`
}
type selectNodes struct {
NodeNames string `json:"nodeName"`
GPUNum int `json:"gpuNum"`
}
type Ids struct {
Uid int `json:"uid"`
Tid int `json:"tid"`
}
//--------------------------------------------------发送消息--------------------------------------------------
type sendMsg struct {
Type int `json:"type"`
Content *sendMsgContent `json:"content"`
}
type sendMsgContent struct {
Log string `json:"log"`
ResourceInfo *resourceInfo `json:"resourceInfo"`
}
type resourceInfo struct {
NodesListerName string `json:"nodesListerName"`
NodesListerLabel string `json:"nodesListerLabel"`
NodesListerStatus string `json:"nodesListerStatus"`
}